[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scripting question



On Wed, Apr 16, 2003 at 05:44:04PM +0200, David Jardine wrote:
> On Wed, Apr 16, 2003 at 02:05:52PM +0100, Colin Watson wrote:
> > On Wed, Apr 16, 2003 at 03:40:42PM +0200, David Jardine wrote:
> > > Well,
> > > 
> > > 	grep foo "ignore\|this\|and\|that" -v
> > > 
> > > works for me but
> > > 
> > > 	grep foo 'ignore\|this\|and\|that' -v
> > > 
> > > doesn't.
> > 
> > Neither of those is right anyway (you've got the pattern and the
> > filename the wrong way round), so perhaps you could paste exactly what
> > you're doing?
> 
> Oops, sorry.  Yes, I did get them wrong way round.
> Nevertheless,
> 
> 	zcat logs.gz|grep "200\|302\|304" -v|...
> 
> or something similar does enable me to isolate odd 
> entries, whereas single quotes, with or without the 
> backslashes, don't work.

How odd. Try using 'echo' to see what the difference is in what's being
passed to grep, since the above should be identical with '...' and
"...".

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: