[PLUG] complex expressions with egrep

Russell Senior seniorr at aracnet.com
Tue May 21 23:48:29 UTC 2002


>>>>> "Jeme" == Jeme A Brelin <jeme at brelin.net> writes:

Jeme> There's probably also a BEST way, but the BETTER way that leaps
Jeme> immediately to mind is:

Jeme> grep string1 logfile|grep "string2|string3"

Jeme> That way, you're not doing the OR for every line when you are
Jeme> going to discard the ones that don't match string1 anyway.  Of
Jeme> course, I can imagine that with a very complext string1, you'll
Jeme> get better performance the other way.  So yymv, I suppose.

In "database land", they call this sort of thing "query optimization".


-- 
Russell Senior         ``The two chiefs turned to each other.        
seniorr at aracnet.com      Bellison uncorked a flood of horrible       
                         profanity, which, translated meant, `This is
                         extremely unusual.' ''                      




More information about the PLUG mailing list