tail / grep

Joseph Key keyj001 at hawaii.rr.com
Thu Nov 16 19:15:06 PST 2000


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



More information about the LUAU mailing list