[TriLUG] Learn something new every day.
Brian Daniels
bitmage at bellsouth.net
Mon Feb 20 17:02:00 EST 2006
On Mon, Feb 20, 2006 at 04:34:30PM -0500, Jason Tower wrote:
> you can also combine multiple targets in one command. for example, i
> run the following in a screen session on all of my mail servers:
>
> tail -f /var/log/mail/info |grep -v -e pop3d -e imap
>
> the -v is a reverse grep, it returns everything -except- lines that
> match the target. i don't care about seeing each user that retreives
> their mail via pop or imap, i just want to see smtp messages.
True, but what I was after was an AND, only returning lines containing foo and
bar. If I use 'grep -e foo -e bar', I get back lines with either foo or bar.
You could build an extended regex to match I guess, but I was in a hurry. :-)
--Brian
--
I think my life is fuller because I realize
that I don't know what I'm doing.
I'm delighted with the width of the world!
---Richard Feynman
Brian Daniels bitmage at bellsouth.net
http://www.eviloverlord.net
More information about the TriLUG
mailing list