Put this in filename.txt
:
abc
def
ghi
jkl
grep command using -E option with a pipe between tokens in a string:
grep -Ev 'def|jkl' filename.txt
prints:
abc
ghi
Command using -v option with pipe between tokens surrounded by parens:
egrep -v '(def|jkl)' filename.txt
prints:
abc
ghi