Grep
grep
is a handy utility to search lines by patterns.
There are some variations.
egrep
can read the patterns as extended regex.
fgrep
is the most performant, but it does not understand regex.
To grep compressed file, there are zgrep
, zegrep
, and zfgrep
accordingly.
Useful Command Options
Turn grep
into egrep
Print Only The Matching Parts
Print The N Lines Around Each Match
Print The Mismatching Lines
Last updated