Post

TIL tac

tac

Concatenate and write files in reverse, copies each FILE ( - means standard input), or standard input if none are given, to standard output, reversing the records (lines by default) in each file separately.

OSX doesn’t have tac out of the box, but add the following line to your .bash_profile and you’re good to go:

alias tac='tail -r'
This post is licensed under CC BY 4.0 by the author.