tail / grep

Mike Ballon calzonie at hawaii.rr.com
Thu Nov 16 20:10:31 PST 2000


I'll have to wait until tomorrow to try this, thanks.

----- Original Message -----
From: "Joseph Key" <keyj001 at hawaii.rr.com>
To: "Linux Users Anonymous" <luau at luau.hi.net>
Sent: Thursday, November 16, 2000 5:15 PM
Subject: [luau] Re: tail / grep


> I did some testing of a tail followed by a grep redirected to a file.  I
> found that when the command is run without the -f in the tail it works
fine.
> Why are you using -f in tail?  I think the problem is to get a useful
output
> you need to end with a control-c this kills the tail and grep before they
> can redirect.  The file is open but doesn't get anything till the command
> ends.  I found that if you ps ax and just kill the tail command the
redirect
> works like it should.  Hope this helps.
>
> Joseph Key
>
> ----- Original Message -----
> From: "Mike Ballon" <calzonie at hawaii.rr.com>
> To: "Linux Users Anonymous" <luau at luau.hi.net>
> Sent: Thursday, November 16, 2000 9:48 AM
> Subject: [luau] tail / grep
>
>
> > 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: keyj001 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