Created
March 11, 2016 22:23
-
-
Save jjgonecrypto/e1a18942bcb081ac5aaa to your computer and use it in GitHub Desktop.
Echo 5 lines before and after line in a file
This file contains hidden or 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
| #Usage echoline LINE_NUMBER FILE | |
| function echoline() { sed -n "$(($1 - 5)),$(($1 + 5))p" $2; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment