Re: [Nolug] grepping multiple strings

From: Andrew S. Johnson <andy_at_asjohnson.com>
Date: Mon, 3 Mar 2003 15:00:24 -0600
Message-Id: <200303031500.25006.andy@asjohnson.com>

On Monday 03 March 2003 02:13 pm, Ron Johnson wrote:
> On Mon, 2003-03-03 at 13:53, Andrew S. Johnson wrote:
> > On Monday 03 March 2003 01:14 pm, Scott Harney wrote:
> > > "Andrew S. Johnson" <andy@asjohnson.com> writes:
> > >
> > > > How about egrep "this.*that|that.*this". Worked for me.
> > >
> > > Doesn't scale too well beyond two search terms though, does it?
> >
> > No, but maybe the example will be useful for someone.
> >
> > > Believe it or not, I deliberately ignored doing that example in my
> > > reply for this reason. I very frequently do things like:
> > >
> > > $ grep pattern1 /var/log/logfile | grep -v ignorepattern1 \
> > > | grep -v ignorepattern2 | less
> >
> > This is usually what I do, with the occaisional sed and/or awk
> > thrown in for good measure.
> >
> > This is similar to the difference between a leatherman and
> > a toolbox. While in theory the leatherman gives you all the
> > implements in one single compact package, separate tools
> > are actually easier to use. If I start hinting now for the
>
> But using the same tool over and over again can get kinda old.
>
> In this case, piping thru grep over and over gets kinda old, and
> is way excess typing.

I suppose, but if you've ever replaced a transmission youself
(vs. spending $k's for someone else to do it) you know that all the
bolts holding the bell housing to the block are the same size.
Ratcheting all those bolts is repetitive to be sure, but is sure is
convenient that one tool will do them all, esp. when you're laying
under the car.

Can I be a gear head and a chip head at the same time?

Andy Johnson

___________________
Nolug mailing list
nolug@nolug.org
Received on 03/03/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST