How to exclude lines with grep
$ grep -v [exclude_string] [file]
- Command
- grep
- Description
- Select lines that do NOT match the specified pattern. Useful for filtering out noise in logs.
- Deep Dive
- -v stands for inVert match. Example: `grep 'ERROR' log.txt | grep -v 'MinorWarning'`