snippetbashTip
rev — Reverse a line of text or a file. More information: <https://manned.org/rev>.
Viewed 0 times
commandtextrevclifilereversemoreline
linux
Problem
How to use the
rev command: Reverse a line of text or a file. More information: <https://manned.org/rev>.Solution
rev — Reverse a line of text or a file. More information: <https://manned.org/rev>.Reverse text typed into terminal:
revReverse the text string "hello":
echo "hello" | revReverse 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]}}Code Snippets
Reverse text typed into terminal
revReverse the text string "hello"
echo "hello" | revReverse 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]}}Context
tldr-pages: linux/rev
Revisions (0)
No revisions yet.