W3cubDocs

/Nushell

reverse for filters

Reverses the input list or table.

Signature

> reverse {flags}

Input/output types:

input output
list<any> list<any>
table table

Examples

Reverse a list

> [0,1,2,3] |reverse
╭───┬───╮
03
12
21
30
╰───┴───╯

Reverse a table

> [{a:1} {a:2}] |reverse
╭───┬───╮
# │ a │
├───┼───┤
02
11
╰───┴───╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/reverse.html