grep
grep searches for regular expression (regex) patterns in files and prints
matching lines.
Useful options
Short options can be chained like so -iv.
| flag | effect |
|---|---|
-i, --ignore-case |
ignore case |
-v, --invert-match |
show non-matching lines |
-E, --extended-regexp |
interpret regex patterns as extended regex |
-o, --only-matching |
print only matched parts of a line |
-r, --recursive |
reads files under directories recursively |