The awk Report Generator

The awk report generator combines the regular expression features of grep and sed with the programming flexibility of the C language.

Its name derives from the initials of the authors of the original version, Alfred Aho, Peter Weinberger, and Brian Kernighan, all of Bell Labs.

Originally written in 1977, awk was updated in 1985 and released as nawk. Since then variations have been developed and released with different versions of Unix or its clones. On our system, awk, and nawk link back to the mawk program.

Although awk can be applied to any text data file, it is most useful processing data arranged in table format, i.e. rows and columns. awk treats each line of a file as a record and each word in the line as a field. The user may limit the scope of action applied to a record based on its record number, line contents, or even particular field contents. awk provides logical, arithmetic, and regular expressions filters to accomplish this.

General syntax :

awk [options] -f cmd_file data-file[s]

[options]

Commands data-file[s]