[TriLUG] Awk question

Tanner Lovelace clubjuggler at gmail.com
Tue Aug 7 15:38:34 EDT 2007


On 8/7/07, Mark Freeze <mfreeze at gmail.com> wrote:
> Any suggestions on how to do this with awk? Can it be done?  Better
> and faster than Perl?

It's been so long since I've done any awk I can't give you
awk code for this until I've had a chance to refer back to
my Sed & Awk book back at home, but I can tell you that
yes, I believe awk can do this, but I don't actually think it
will be that much faster than perl.  It is true that the awk
interpreter is much smaller than the perl one, so it will
load faster, but perl is very optimized for text processing
so I don't think you'll see much improvement.

Of course, this just begs a competition^H^H^H^Hcomparison
between awk versions and perl versions (and hey, why not
other versions too!).  It would be very cool to actually get some
hard numbers on a problem like this that would answer
the question of which is faster: awk or perl.

Cheers,
Tanner

-- 
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.



More information about the TriLUG mailing list