tail / grep

Joseph Key keyj001 at hawaii.rr.com
Thu Nov 16 20:34:16 PST 2000


I did some more testing and found.  If you remove the grep the command works
like it should.  I put tee instead of redirecting and found that it works
without the grep but as soon as you try and grep the output of the tail all
output stops till the tail command is killed (if you control-c the whole
command the command line and output file are empty).  I tried putting what
is to be grepped on the command line and still no output.

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 6:10 PM
Subject: [luau] Re: tail / grep


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