tac

v0.0.26
tac [OPTION]... [FILE]...

Write each file to standard output, last line first.

Options

--before, -b

attach the separator before instead of after

--regex, -r

interpret the sequence as a regular expression

--separator=<STRING>, -s <STRING>

use STRING as the separator instead of newline

Examples

Concatenate specific files in reversed order:

tac {{path/to/file1 path/to/file2 ...}}

Display stdin in reversed order:

{{cat path/to/file}} | tac

Use a specific [s]eparator:

tac -s {{separator}} {{path/to/file1 path/to/file2 ...}}

Use a specific [r]egex as a [s]eparator:

tac -r -s {{separator}} {{path/to/file1 path/to/file2 ...}}

Use a separator [b]efore each file:

tac -b {{path/to/file1 path/to/file2 ...}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.