Back to the command reference

rev

ShellBeginner In simulator In real Linux

Reverse the characters of each line

Name: rev = reverse

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

rev reverses the characters of each line. A handy trick: rev | cut -d. -f1 | rev extracts the last field, such as a file extension.

Syntax

rev [FILE]...

Examples

Related