Shell command question

Ben Beeson beesond001 at hawaii.rr.com
Thu Sep 7 22:30:09 PDT 2000


Steve,

	Funny you should ask.... I had a similar question that I figured out
just the other day.  I have a crontab entry that parses my /var/log/secure and
sends the results to my mail at home and at work.  For the purposes of the
mail, I don't need to see the entries from 127.0.0.1 as those are my screwups
when I play at home....  Here is how I fixed it:

cat /var/log/secure | grep "in.ftpd" | egrep -v '(127.0.0.1)' | mail -s ya
da ya da..... 


The trick I think you are looking for is the egrep -v command.  That matches
all those entries that don't match the regex and succeeds in not garbaging up
my mail.  I hope this is what you need.

Good Luck,

Ben Beeson





On Thu, 07 Sep 2000, you wrote:
> I use the following command to have a scrolling screen of all denied 
> requests to my squid web cache:
> 
> tail -f /var/log/squid/access.log | grep DENIED
> 
> How would I do the same and have a small list of lines to exclude in the 
> results.  I want all denied requests except those to real.com and the ad 
> servers I block.
> 
> I know there are a million ways to do what I want, but I'd prefer a one liner.
> 
> Thanks,
> 
> Steve
> 
> 
> ---
> You are currently subscribed to luau as: beesond001 at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list