Learn a Little AWK

It used to be that almost every programmer was proficient with AWK. When Perl came along, that became less true and now many programmers have never used—or even heard of—AWK. That’s too bad because it’s a tremendously useful tool and, in my opinion, much easier to learn and use than Perl. Although it’s possible to write reasonably complex applications in AWK it really excels in short, simple text manipulation.

Greg Grothaus (via Wilfred Hughes) has a nice post, Why you should learn just a little Awk, that demonstrates some simple AWK manipulations. His examples are very elementary and don’t begin to exercise the full power of AWK. Still, they give you the flavor and should encourage you to learn a bit more.

The definitive source is, of course, Aho, Kernighan, and Weinberger’s The AWK Programming Language. If you’re serious about learning AWK, that should be your go-to source. There’s also Eric Pement’s HANDY ONE-LINERS FOR AWK and Jonathan Palardy’s four-part AWK tutorial. The latter two resources build on Grothaus’ tutorial and will likely give you everything you need to know for everything but the most serious AWK applications.

This entry was posted in General and tagged . Bookmark the permalink.