tac - concatenate and print files in reverse
tac [-br] [-s separator] [-B] [-S bytes] [file...]
tac copies files or standard input to standard output with the order of records reversed.
Attach separator to the beginning of the record that it precedes in the file.
Read files in binary mode.
The separator is a regular expression.
Use STRING as record separator. Set to '' for paragraph mode. Defaults to newline.
''
Number of bytes to read at a time. Defaults to 8192.
-B and -S are peculiar to this implementation of tac.
Regular expressions are as in Perl with some caveats:
/foo(bar)/
Do not use capturing parenthesis. They will conflict with tac's internal use of them.
/foo|bar/
Alternation may match out of sequence, because matches are made against chunks of files rather than whole files. Set -S to a suitably large number to avoid this.
The Perl implementation of tac was written by Tim Gim Yee, tim.gim.yee@gmail.com.
This program is copyright (c) Tim Gim Yee 1999.
This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlPowerTools
CPAN shell
perl -MCPAN -e shell install PerlPowerTools
For more information on module installation, please visit the detailed CPAN module installation guide.