Tac
Jump to navigation
Jump to search
tac is the same as cat, only tac shows lines in reverse. Imagine a file foo that contains:
hello world
tac foo
will print:
world hello
to print the characters in a line in reverse you can use rev, to print both lines and characters in reverse use
tac foo | rev
Provided by
Most (all?) Linux distributions incorporate this from the GNU Coreutils: and use its man page
Many Linux systems, however, are using a different version. The current author has not yet tracked this down.
Related Commands
These all relate to the output or processing of entire files