View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Tac

From LQWiki

Jump to: navigation, 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

Share

Personal tools