- The - -Eoption enables extended expression syntax (ERE) for grep.
- The - -ioption tells grep to match case-insensitive
- The - -voption tells grep to invert the result (i.e. match lines not containing the pattern)
- The - -coption tells grep to output the number of matched lines instead of the lines themselves
- The patterns: - \<matches the beginning of a word (thanks @glenn-jackman@glenn-jackman)
- \>matches the end of a word (thanks @glenn-jackman@glenn-jackman)
 - --> That way we can make sure to not match words containing 'the' or 'an' (like 'pan') - grep -Evi -e '\<an\>.*\<the\>'thus matches all lines not containing 'an ... the' ~(Note: I did purposefully not include the case "an the" ('the' directly following on 'an' because it is an unlikely case and I wanted to keep the pattern simple. It could, of course, easily be added)~.- grep -Evi -e '\<an\>.*\<the\>'thus matches all lines not containing 'an ... the'
-  Similarly, grep -Evi -e '\<the\>.*\<an\>'matches all lines not containing 'the ... an'Similarly, grep -Evi -e '\<the\>.*\<an\>'matches all lines not containing 'the ... an'
- grep -Evi -e '\<an\>.*\<the\>' -e '\<the.*an\>'is the combination of the 3. and 4.- grep -Evi -e '\<an\>.*\<the\>' -e '\<the.*an\>'is the combination of the 3. and 4.
- grep -Eci -e '\<(an|the)\>'matches all lines containing either 'an' or 'the' (surrounded by whitespace or start/end of line) and prints the number of matched lines- grep -Eci -e '\<(an|the)\>'matches all lines containing either 'an' or 'the' (surrounded by whitespace or start/end of line) and prints the number of matched lines