grep 'some string to match' -B 2 -A 2 myfile.txt
Created
September 4, 2017 17:33
-
-
Save fieldse/75cbe30bdcd29e2476b82aaa6a75e8fc to your computer and use it in GitHub Desktop.
Show lines before and after a matching string with grep
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment