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

Re: regular expressions and grep



Stephen Masterman wrote:

> >grep -v named /var/adm/daemon.log | grep -v smtpd
> 
> It seems silly to have to run grep a separate time for each string I wish
> to exclude, can someone tell me how to combine the strings in the manner that
> I desire?

Funny you should ask. I just had to do the same thing for the first time a
couple of hours ago.

egrep!

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

In my case, I wasdecimating the output of nm:

nm *.a | egrep '^Symbols|FUNC \|GLOB' 

-- 
...RickM...



Reply to: