Aviva Directory » Computers & Internet » Programming » AWK

A standard feature of most Unix-like systems, AWK is a domain-specific, interpretive programming language used for data manipulation, arithmetic operations, and restructuring raw data for generating reports.

Its name comes from the initials of its original designers: Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan. The original version was designed in 1977 at AT&T Bell Laboratories. The original AWK interpreter, still available from AT&T, is not used much anymore, largely because it splits a line into a maximum of 99 fields.

In 1985, a new version made the language more powerful, introducing user-defined functions, multiple input streams, and computed regular expressions. This version, known as New AWK (NAWK) was distributed with Unix System V Release 3.1 in 1987 and continues to be maintained by Brian W. Kernighan, one of the original AWK authors. In the early 1990s, the POSIX Command Language and Utilities standard introduced further changes in the language.

AWK is a data-driven scripting language. It is also a pattern-action language. It searches for patterns in a given input and, when a match is found, it performs the corresponding action.

Written by Paul Rubin, Jay Fenlason, and Richard Stallman in 1986, the GNU implementation of AWK is known as GAWK. In 1988 and 1989, it was reworked for compatibility with the NAWK. When invoked with the correct options or environment variables, GAWK is fully compatible with the POSIX specification of the AWK language and with (NAWK), the Unix version of AWK maintained by Kernighan. Properly written AWK programs should work with either GAWK or NAWK.

AWK is used to manage small, personal databases, to generate reports, validate data, produce indexes and perform other document-preparation tasks, and to experiment with algorithms that can later be adapted to other programming languages. In addition, GAWK adds the ability to extract data for processing, sort data, perform network communications, profile and debug AWK programs, and to extend the language with C or C++ functions.

Other AWK interpreters or translators include AWKA, AWKC++, AWK2C, AWKCC, BusyBox, JAWK, LIBMAWK, MAWK, MKSAWK, TAWK, and ZGAWK.

AWK or any of its dialects or implementations are appropriate topics for this category, as are any editors or tools designed to facilitate programming in AWK, as well as AWK tutorials or guides.

 

 

Recommended Resources


Search for AWK on Google or Bing