tail / grep

Mike Ballon calzonie at hawaii.rr.com
Sun Nov 19 17:58:43 PST 2000


Nothing.

It's seems to be a combination of the tail -f and grep -f because this
works:

cat /var/log/squid/access.log |grep -f Sex.txt >test2

as does this:

tail /var/log/squid/access.log |grep -f Sex.txt >test2

----- Original Message -----
From: "Ben Beeson" <beesond001 at hawaii.rr.com>
To: "Linux Users Anonymous" <luau at luau.hi.net>
Sent: Saturday, November 18, 2000 9:26 PM
Subject: [luau] Re: tail / grep


> Mike,
>
> I have just  checked the LUAU list for the first time in several days.
> I have modded my profiles so that I have to force an overwrite, so my
answer
> may be different than yours.  I have a few crontabs that parse log files
in a
> similar fashion and then send the results in e-mail.  Perhaps this thought
may
> help. Try placing "2>&1" in your commmand line.  This sends both standard
out
> and standard error down the pipe.
>
> Good luck,
>
> Ben
>
>
>
> On Thu, 16 Nov 2000, you wrote:
> > Here's a good one:
> >
> > tail -f /var/log/squid/access.log | grep -f /etc/Sex.txt >
/tmp/busted.txt
> >
> > The tail part of the command runs, the grep runs (-f read from file) but
I can
> > not get it to output to the /tmp/bustex.txt file to save my life and I
can't
> > figure out why.  Without using the redirection at the end the results of
the
> > grep are displayed on the crt no problem.
> >
> > What I'm thinking is that the grep -f puts the command in a loop and it
never
> > gets to the > redirect portion, you think?
> >
> >
> > ---
> > You are currently subscribed to luau as: beesond001 at hawaii.rr.com
> > To unsubscribe send a blank email to $subst('Email.Unsub')
>
> ---
> You are currently subscribed to luau as: calzonie at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list