tail / grep

Chris Wong wongc at math.ed.hawaii.edu
Fri Nov 17 12:44:48 PST 2000


On Fri, 17 Nov 2000, Myles Uyema wrote:

> This is likely because most shell utilities buffer stdout. You can see
> this behavior with tcpdump as well.  A good thing about tcpdump
> though, is that it has the -l switch to go into line-by-line mode,
> which is redirection-friendly.

So shouldn't output be seen eventually?

And shouldn't output come out after you break the pipe?

> I see no similar option with grep.

Y'know at this point, write a perl script. It'll take the same amount of
time.. and might even be quicker.

> On Thu, 16 Nov 2000, Mike Ballon 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: luau at uyema.net
> > To unsubscribe send a blank email to $subst('Email.Unsub')
> > 
> 
> 
> ---
> You are currently subscribed to luau as: wongc at math.ed.hawaii.edu
> To unsubscribe send a blank email to $subst('Email.Unsub')
> 



More information about the LUAU mailing list