Linked by Tony Steidler-Dennison on Tue 15th Jul 2008 14:35 UTC, submitted by LinucksGirl
Permalink for comment 323756
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 06/18/13 22:33 UTC
Linked by Anonymous on 06/18/13 22:26 UTC
Linked by Thom Holwerda on 06/18/13 22:25 UTC
Linked by Thom Holwerda on 06/18/13 17:45 UTC
Linked by Thom Holwerda on 06/18/13 17:32 UTC, submitted by poundsmack
Linked by Thom Holwerda on 06/17/13 17:58 UTC
Linked by Thom Holwerda on 06/17/13 17:52 UTC
Linked by Thom Holwerda on 06/14/13 21:03 UTC
Linked by Thom Holwerda on 06/14/13 20:46 UTC
Linked by Thom Holwerda on 06/14/13 17:32 UTC
More News »
Sponsored Links



Member since:
2005-10-10
What the hell? To quote what ESR said about Awk in "The Art of Unix Programming" ( http://www.faqs.org/docs/artu/ch08s02.html#awk ):
{{{{{{{{{{
A case study of awk is included to point out that it is not a model for emulation; in fact, since 1990 it has largely fallen out of use. It has been superseded by new-school scripting languages—notably Perl, which was explicitly designed to be an awk killer. The reasons are worthy of examination, because they constitute a bit of a cautionary tale for minilanguage designers.
The awk language was originally designed to be a small, expressive special-purpose language for report generation. Unfortunately, it turns out to have been designed at a bad spot on the complexity-vs.-power curve. The action language is noncompact, but the pattern-driven framework it sits inside keeps it from being generally applicable — that's the worst of both worlds. And the new-school scripting languages can do anything awk can; their equivalent programs are usually just as readable, if not more so.
}}}}}}}}}}}
As someone who eats, lives and breathes Perl almost everyday, including for some "more serious" applications and APIs development, I find Awk to be incredibly limited, confusing, and kludgy. Perl is much more consistent, does not enforce awk's line-based coding (though it can be added using some http://perldoc.perl.org/perlrun.html command line flags), and is a serious programming. So I've noticed that I've been using variations on "perl -e" instead of Awk (and instead of sed) instead.
Awk knowledge is useful in understanding other people's old shell code, but it's a stupid and old language that falls between the chairs and should be put to sleep. Just do yourself a favour and use Perl or Ruby or whatever.