Grep with OR and -v

Hi there,

I am trying to grep my access log to remove all MSIE and Mozilla lines..

If I do
bash$ tail -f access.log | grep -v 'MSIE'
then I exclude all MSIE no problem.
but if I change it so
'MSIE|Mozilla'
or
"MSIE|Mozilla"
or
even try both with "(MSIE|Mozilla)"
then it will just show all as usual...
how can I use grep to exclude MSIE and Mozilla
thinking about it now... the | = or so that with -v might be my downfall...
LVL 10
wildzeroAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
or
grep -v 'MSIE\|Mozilla'
or
egrep -v 'MSIE|Mozilla'
0
 
ozoCommented:
tail -f access.log | grep -v 'MSIE' |grep -v Mozilla
0
 
wildzeroAuthor Commented:
Thanks :-) I was trying to avoid doing two | greps's
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.