/
๐Ÿ”

Grep with lines before and after, and highlight

ShellLinux
$ grep -B 5 -A 5 --color "Search Query"

For example, when I want to search for "svg fill"

$ git log | grep -B 4 -A 4 --color 'svg fill'
Edit this page
Code Snippets & Notes by Makzan