tail / grep

Myles Uyema luau at uyema.net
Fri Nov 17 12:16:23 PST 2000


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.

I see no similar option with grep.

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')
> 



More information about the LUAU mailing list