grep

Grep multiple patterns

grep -E '<pattern 1>|<pattern 2>' <file to grep on>

grep -Ev '<pattern 1>|<pattern 2>' <file to grep on>

-B <number of lines before match to display>

-A <number of lines after match to display>

Last updated