Skip to content

Instantly share code, notes, and snippets.

@g-ilham
Created August 27, 2015 10:11
Show Gist options
  • Save g-ilham/df1a62638f9eb7ada1f7 to your computer and use it in GitHub Desktop.
Save g-ilham/df1a62638f9eb7ada1f7 to your computer and use it in GitHub Desktop.
grep in logs on VPS
A - after
B - before
C - same number of lines before and after
git blame Gemfile | grep -B10 -A10 BlaBla
git blame Gemfile | grep -C10 BlaBla
cat mylog | grep -A10 BlaBla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment