linux - grep exclude multiple strings -
i trying see log file using tail -f , want exclude lines containing following strings:
"nopaging limit is"` , `"keyword remove is" i able exclude 1 string this:
tail -f admin.log|grep -v "nopaging limit is" but how exclude lines containing either of string1 or string2.
two examples of filtering out multiple lines grep:
put in filename.txt:
abc def ghi jkl grep command using -e option pipe between tokens in string:
grep -ev 'def|jkl' filename.txt prints:
abc ghi command using -v option pipe between tokens surrounded parens:
egrep -v '(def|jkl)' filename.txt prints:
abc ghi