Reverses characters in each line of a file.
rev [ File ... ]
The rev command copies the named files to standard output, reversing the order of characters in every line. If you do not specify a file, the rev command reads standard input.
To reverse characters in each line of a file, type:
rev file
If the file file contains the text:
abcdefghi
123456789
then the rev command displays:
ihgfedcba
987654321
Item | Description |
---|---|
/usr/bin/rev | Contains the rev command. |