
'tac' - concatenate and print in reverse - Video Man Pages
The 'tac' is used to concatenate files and print them in reverse.
- Print the contents of a file in reverse (by line) to stdout:
tac path/to/file
- Concatenate specific files in reverse:
tac file1 path/to/file2 ...
- Display stdin in reversed order:
printf "one\ntwo\nthree\n" | tac
- Use a specific separator rather than the new line:
tac -s separator path/to/file1 path/to/file2 ...
- Use a specific regex as a separator:
tac -r -s 'regex' path/to/file1 path/to/file2 ...
EXAMPLE: tac -r -s 'x\|[^x]' file1
This matches either the character 'x' OR any character that is not 'x', effectively matching every character in the file.
- Use a separator (new line by default) before each file:
tac -b file1 file2 ...
REFERENCED:
► https://gitlab.com/dwt1/vidman
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: https://www.patreon.com/distrotube
💳 Paypal: https://www.paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
🛍️ Amazon: https://amzn.to/2RotFFi
👕 Teespring: https://teespring.com/stores/distrotube
DT ON THE WEB:
🕸️ Website: http://distro.tube
📁 GitLab: https://gitlab.com/dwt1
🗨️ Mastodon: https://fosstodon.org/@distrotube
👫 Reddit: https://www.reddit.com/r/DistroTube/
📽️ Odysee: https://odysee.com/@DistroTube:2
FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
🌐 Brave Browser - https://brave.com/
📽️ Open Broadcaster Software: https://obsproject.com/
🎬 Kdenlive: https://kdenlive.org
🎨 GIMP: https://www.gimp.org/
💻 VirtualBox: https://www.virtualbox.org/
🗒️ Doom Emacs: https://github.com/hlissner/doom-emacs
Your support is very much appreciated. Thanks, guys!
