No subject


Wed Feb 25 15:27:10 PST 2009


-f FILE, --file=FILE
              Obtain patterns from FILE, one per line.  The empty
              file contains zero patterns, and  therfore  matches
              nothing.

I think the -f flag is causing grep to open a file to get the pattern to
match.  What follows is not a legitimate file name so it either hangs trying
to open nothing or matches nothing.

What is it you're trying to do with the -f on the grep?

-Doug-

> -----Original Message-----
> From: Mike Ballon [mailto:calzonie at hawaii.rr.com]
> Sent: Thursday, November 16, 2000 9:14 PM
> To: Linux Users Anonymous
> Subject: [luau] Re: tail / grep
> 
> 
> I think the grep -f is putting it in a loop from what I can tell, so
> basically the next command ">" is never getting run.  It 
> works great if you
> just use |grep word with the tail, the grep -f is what's 
> throwing things off
> for sure.
> 
> This was actually just something I was playing with and now 
> it's got my
> stumped.
> 
> ----- Original Message -----
> From: "Joseph Key" <keyj001 at hawaii.rr.com>
> To: "Linux Users Anonymous" <luau at luau.hi.net>
> Sent: Thursday, November 16, 2000 6:34 PM
> Subject: [luau] Re: tail / grep
> 
> 
> > 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')
> > >
> >
> >
> > ---
> > 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: dougs at oceanic.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
> 



More information about the LUAU mailing list