This was named for the initials of the folks who wrote it: Aho, Kernighan, and Weinberger.
It's a programming language, though you probably wouldn't want to write anything very complicated in it. It is good for simple scripting to add up columns or print only parts of lines, but the syntax does take a bit of getting used to.
You need to know what awk is, and should at least be able to read a script that uses it, but I'd suggest that you use Perl whenever otherwise tempted to use this. The man page (nowadays it is probably gnu awk or "gawk" that you actually have) probably has some examples at the end of it.
If you really want to get into it, I'd recommend O'Reilly's Sed & Awk, but I think you'd be smarter to spend that energy learning Perl.
See grep awk example script for an awk (and Perl) example. This Awk vs. Perl may also be of interest.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-03-27 Tony Lawrence
If debugging is the process of removing bugs, then programming must be the process of putting them in. (Edsger W. Dijkstra)
Printer Friendly Version
awk Copyright © September 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version