1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/tac.md

26 lines
597 B
Markdown
Raw Normal View History

2015-12-28 22:01:39 +01:00
# tac
> Display and concatenate files with lines in reversed order.
> See also: `cat`.
> More information: <https://www.gnu.org/software/coreutils/tac>.
2015-12-28 22:01:39 +01:00
- Concatenate specific files in reversed order:
2015-12-28 22:01:39 +01:00
`tac {{path/to/file1 path/to/file2 ...}}`
2015-12-28 22:01:39 +01:00
- Display `stdin` in reversed order:
2020-02-08 20:18:47 +05:30
`{{cat path/to/file}} | tac`
2020-02-08 20:18:47 +05:30
- Use a specific [s]eparator:
2015-12-28 22:01:39 +01:00
`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 ...}}`