Global Regular Expression Print Print lines matching a pattern:
grep [options] regex [file...]
| Option | Long Option | Description |
|---|---|---|
| -i | –ignore-case | Ignore case |
| -v | –invert-match | Invert match |
| -c | –count | Print the number of matches |
| -l | –files-with-matches | Print name of each file containing match |
| -L | –files-without-match | Print files that don't contain matches |
| -n | –line-number | Prefix match with line number |
| -h | –no-filename | Suppress printing filenames |