[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: regular expressions and grep



>>>>> "S" == Stephen Masterman <floyd@animals.mit.edu> writes:

>> grep -v named /var/adm/daemon.log | grep -v smtpd

S> It seems silly to have to run grep a separate time for each string
S> I wish to exclude, can someone tell me how to combine the strings
S> in the manner that I desire?

How about 

  egrep -v "named|smtpd" /var/adm/daemon.log

(I can't check the man pages right now to be sure, but you get the
idea...)

--
Rob



Reply to: