rev command in Linux with Examples
rev command in Linux is used to reverse the lines characterwise. This utility basically reverses the order of the characters in each line by copying the specified files to the standard output. If no files are specified, then the standard input will read.
Syntax:
rev [option] [file...]
Example 1: Taking input from standard input
Example 2: Suppose we have a text file named as sample.txt
Using rev command on sample file. It will display the result on the terminal as follows:
Options:
- rev -V: This option display the version information and exit.
rev -V
- rev -h: This option will show the help message and exit.
rev -h
Recommended Posts:
- cut command in Linux with examples
- tac command in Linux with Examples
- atd command in Linux with examples
- man command in Linux with Examples
- cpp command in Linux with Examples
- cvs command in Linux with Examples
- w command in Linux with Examples
- cp command in Linux with examples
- sum command in Linux with Examples
- last command in Linux with Examples
- help Command in Linux with examples
- dir command in Linux with examples
- ln command in Linux with Examples
- ex command in Linux with examples
- ar command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.








