mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Print Out Files In Reverse as a unix til
This commit is contained in:
@@ -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).
|
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)
|
- [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)
|
- [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 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)
|
- [Repeat Yourself](unix/repeat-yourself.md)
|
||||||
- [Saying Yes](unix/saying-yes.md)
|
- [Saying Yes](unix/saying-yes.md)
|
||||||
- [Search Files Specific To A Language](unix/search-files-specific-to-a-language.md)
|
- [Search Files Specific To A Language](unix/search-files-specific-to-a-language.md)
|
||||||
|
|||||||
19
unix/print-out-files-in-reverse.md
Normal file
19
unix/print-out-files-in-reverse.md
Normal 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.
|
||||||
Reference in New Issue
Block a user