grep -v
is your friend:
grep --help | grep invert
-v, –invert-match select non-matching lines
Also check out the related -L
(the complement of -l
).
-L, –files-without-match only print FILE names containing no match
More Related Contents:
- How to extract all Yahoo emails from a .CSV file?
- How to find patterns across multiple lines using grep?
- Validating IPv4 addresses with regexp
- Regex (grep) for multi-line search needed [duplicate]
- How do I grep for all non-ASCII characters?
- (grep) Regex to match non-ASCII characters?
- Regex lookahead for ‘not followed by’ in grep
- Using the star sign in grep
- Bash, grep between two lines with specified string
- How to invert a grep expression
- What does ‘\K’ mean in this regex?
- Unix grep regex containing ‘x’ but not containing ‘y’
- Does lookbehind work in sed?
- Difference between egrep and grep
- Using sed and grep/egrep to search and replace
- Grep and regex – why am I escaping curly braces?
- How to do a non-greedy match in grep?
- grep regex whitespace behavior
- How to make “grep” read patterns from a file?
- subdomain htaccess rediect with query string
- Find ‘word’ not followed by a certain character
- Regex to split a CSV
- How can I match nested brackets using regex?
- How to match Cyrillic characters with a regular expression
- What regex can match sequences of the same character?
- Splitting String in VBA using RegEx
- Regular expression to remove one parameter from query string
- Difference between regular expression modifiers (or flags) ‘m’ and ‘s’?
- Splitting a string on the first space
- Matching url with array list of words in AngularJS ui-router