AWK is one of the most common UNIX tools to process text-based data in either files or datastreams. Written by Alfred Aho, Peter Weinberger, and Brian Kernighan, AWK “extensively uses the string datatype, associative arrays (that is, arrays indexed by key strings), and regular expressions.” ComputerWorld interviewed Alfred Aho.As is usually the case, the programming language grew out of a need. “As a researcher at Bell Labs in the early 1970s, I found myself keeping track of budgets, and keeping track of editorial correspondence,” Aho explains, “I was also teaching at a nearby university at the time, so I had to keep track of student grades as well.” He wanted a simple programming language that could deal with these tasks.
The fact that even I could write basic AWK programs is testimony to its ease of use, and despite its age, it still proves its usefulness today. The interview is an interesting read.
When I first used a Unix box back in 1990 I looked for a language to help me understand what this OS could do. The first thing I stumbled across was AWK. I loved it. I soon discovered a lot of other tools of course, but used AWK quite a bit for my work. Believe it or not, cc wasn’t installed on this box back then (probably came on a tape or floppy, but I didn’t think to look – sadly, besides, it was a machine for a customer), so scripting languages where the only way to go.
Must have another look at it again some day, I notice it is on OS X, I know Linux has it there too…
However, what I think of awk is that it is a has-been kept alive by other packages dependant on it. I have yet to hear of new uses of awk. Instead, people use grep when scripting and efficiency is needed, or use perl when needing power.
awk ushered in perl, so should it be considered a stepping stone? I would vote yes, and I sincerely hope that, if such, we should leave it to toil away behind the scenes of history. Developers, simply put, have too many things to juggle with these days, IMHO.