1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Print Out Files In Reverse as a unix til

This commit is contained in:
jbranchaud
2019-12-17 20:43:40 -06:00
parent 50e1151b68
commit ee91d18bda
2 changed files with 21 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
_891 TILs and counting..._
_892 TILs and counting..._
---
@@ -828,6 +828,7 @@ _891 TILs and counting..._
- [Partial String Matching In Bash Scripts](unix/partial-string-matching-in-bash-scripts.md)
- [PID Of The Current Shell](unix/pid-of-the-current-shell.md)
- [Print A Range Of Lines For A File With Bat](unix/print-a-range-of-lines-for-a-file-with-bat.md)
- [Print Out Files In Reverse](unix/print-out-files-in-reverse.md)
- [Repeat Yourself](unix/repeat-yourself.md)
- [Saying Yes](unix/saying-yes.md)
- [Search Files Specific To A Language](unix/search-files-specific-to-a-language.md)

View File

@@ -0,0 +1,19 @@
# Print Out Files In Reverse
If you're familiar with `cat` -- the command you might use to print out a file
in the terminal -- then you may appreciate a similar command: `tac`.
With `tac` you can
> Write each FILE to standard output, last line first.
Notice that `tac` is `cat` spelled in reverse. That's what it does with your
files, prints them out in reverse.
Give it a try just as you'd use `cat`:
```bash
$ tac README.md
```
See `man tac` for more details.