grep
Table of Contents
Anstands fornlines “after” the match.Bmstands formlines “before” the match.
grep -A1 -B1 pattern file
If both numbers are the same, just use -C: grep -C1 yourpattern file
Grep multiple lines #
grep 'a\|b' abc.txt
An stands for n lines “after” the match.Bm stands for m lines “before” the match.grep -A1 -B1 pattern file
If both numbers are the same, just use -C: grep -C1 yourpattern file
grep 'a\|b' abc.txt