grep, etc

Bob Stockler bob at trebor.iglou.com
Wed Aug 18 08:07:34 PDT 2004


On Tue, Aug 17, 2004 at 11:25:01PM -0400, Mark Luljak wrote:
| 
| GNU grep (without a prefix) is probably faster than a stock grep, same as
| I think gawk is faster than awk, but not faster than nawk (Bob's benched
| them and I thought he said nawk was the best).  But any egrep will always
| be slower than a straight grep, assuming you use actual expressions rather
| than static strings.  That's only common sense.  I'm not sure who would use
| egrep when grep would suffice, but it's rather pointless.  Even I've never
| just aliased one to the other, and I can be relatively lazy.  (I -still-
| use an alias of 'elm' to call 'mutt', four or so years later!  Old habits
| die hard.  This is why you have to drive over a nun back and forth several
| times -just- to make sure...)  [Tell me the :) is obvious...]

Correction . . . it's "mawk", and not "nawk", that's the fastest
of all of the various flavors of AWK.

  mawk 1.3.3, Copyright (C) Michael D. Brennan

Brian W. Kernigan still maintains "nawk", which is the lineal
decendent of the original "awk", which was written by him, in
association with Alfred V. Aho and Peter J. Weinberger, while
at AT&T Bell Labs.

I would guess that "mawk" would be faster than "grep" in certain
circumstances, especially when searching a large file, because
it could be made to exit after reading the lines to be matched.

Bob
-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list