commands.sh

rev

linuxmacos

Reverse a line of text or a file.

More info →

Options (3)

-0, --zeroboolean

Use '\0' as a line separator (zero termination)

Example: rev {{[-0|--zero]}} {{path/to/file}}
-h, --helpboolean

Display help

Example: rev {{[-h|--help]}}
-V, --versionboolean

Display version

Example: rev {{[-V|--version]}}

Examples (6)

Reverse text typed into terminal

Reverse the text string "hello"

echo "hello" | rev

Reverse an entire file and print to `stdout`

rev path/to/file

Use '\0' as a line separator (zero termination)

rev [-0|--zero] path/to/file

Display help

rev [-h|--help]

Display version

rev [-V|--version]
made by @shridhargupta | data from tldr-pages