Tell me what you think of sed and awk

j proctor jproctor at oit.umass.edu
Thu Oct 7 10:16:45 CDT 1999


On the Jax.PM jacksonville-pm-list;
j proctor <jproctor at oit.umass.edu> wrote -



> What is the take of you gurus on the list? How worthwhile is the
> sed/awk combo these days? Do you still use them regularly? What would
> you recommend to a beginner?

I started learning sed and awk to do some database conversions about 3
years ago (the company I worked for was massively reorganizing its billing
system at the time).  I started learning Perl within a few weeks because I
ran up against the limits of what sed and awk could easily accomplish for
me.  That's not to say they wouldn't do everything I needed (this did
involve reading and writing multiple files in one pass), it was just much
less obvious than it is in Perl.

Within 9 months, I had a better-paying job doing Perl almost full-time.

Anyway, sed and awk are interesting tools, and I've always considered that
I should go back and play with them a little more just to be sure I didn't
miss something.  But from where I sit (roughly 42*23'37"N, 82*31'41"W,
according to tiger.census.gov), Perl can do everything they can, in a way
that's easier to revisit months or years later (i.e. it's maintainable)
and much more portable.  Lately, I've been tinkering with Perl one-liners;
for me this pretty much seals it as a replacement of the older tools.

Add to this that most recent distributions of free (gratis and/or libre)
UNIX and UNIX-like operating systems all come with Perl pre-built, and
there's not even the argument that it's something extra to install.  

Besides, isn't the awk extinct?  Er, no.  That's the auk.  Nevermind.

I like Perl.  I understand it's not the be-all and end-all of programming
languages, but it's powerful and quick and has a fairly shallow learning
curve (that is, you can do interesting or useful things fairly quickly).  
I think sed and awk are, at this point, interesting footnotes as to why
it's a Good Thing [tm] to have Perl around, and they're really not worth
much more time than it takes to read their man pages and try to use them
to do anything.  :)


> Thanks for putting up with my questions again :)

No problem.  Once you get a cushy Silicon Valley job with some
way-overfunded startup that manages to convert into an IPO before the
investors lose patience, we just expect you to share the wealth. :)


j



The Jacksonville Perl Monger's Group is operated by -
Bill -Sneex- Jones ( sneex at usa.net ),
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list