Reverse lines characterwise.
Synopsis
rev [FILE ...]
Description
Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.
Examples
$ echo 'hello' | rev
Print 'olleh'.
$ rev file.txt
Reverse each line in file.txt.
See Also
tac, sort