grep, etc
Fairlight
fairlite at fairlite.com
Tue Aug 17 20:25:01 PDT 2004
Only Brian K. White would say something like:
>
> I'd say the plain old stock sco grep was useful, since it aswered the need
> very directly in one command without especially exotic options or a
> pipeline. Didn't even require the stock egrep let alone gnu grep or
> pcregrep.
Stock grep on any system is useful, of course. I need egrep occasionally,
however, but it's nice to play with -one- set of extended regexp's, and I
find perl's the most versatile.
> Just because something fancier becomes available, doesn't automatically
> and retroactively make the previous thing useless. Especially if the
> newer more feature bloated thing is larger, less portable or less easily
> portable (libraries), slower, more of a cpu hog, etc...
I use regular grep (whatever that may be on any platform...obviously GNU on
linux, but whatever on Solaris, SCO, etc.) 98%+ of the time, I'd say. But
when I need egrep, it's there. I'd rather use one with a perl-compatible
syntax though, since I do so much perl anyway.
> I'd be interested in performance benchmarks of gnu grep or pcregrep vs
> plain stock grep. I wouldn't be surprized if the stock plain grep is
> faster and/or less of a cpu hog. I wouldn't be surprized if gnu grep was
> faster either I guess, hence the implication to test.
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...]
mark->
--
Bring the web-enabling power of OneGate to -your- filePro applications today!
Try the live filePro-based, OneGate-enabled demo at the following URL:
http://www2.onnik.com/~fairlite/flfssindex.html
More information about the Filepro-list
mailing list