Fork me on GitHub

Grep with context lines above and below

I was about to write a script to implement exactly what already exists natively in GNU grep, a blasphemy I got saved from by my workmates.

grep --line-number --colour=AUTO --before-context 5 --after-context 5 PATTERN FILENAME

Comments !

social