Created
February 4, 2020 16:52
-
-
Save mLuby/2ce9cd69e9a8548604e1a458199e8952 to your computer and use it in GitHub Desktop.
Exclude first and last lines of example.txt just using tail and pipe in bash.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -n +2 example.txt | tail -r | tail -n +2 | tail -r | |
# -n +2 means all but 1 line at the end (+1 does include last line) | |
# -r means reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment