Spokes.wiki Search About
Computer Language source ↗ source url updated Thu Aug 06 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

AWK

Alfred Aho, Peter Weinberger and Brian Kernighan built AWK at Bell Labs in the 1970s, and the acronym is their surnames. A program is a list of pattern–action pairs: in Aho’s words, AWK “reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed.” Input arrives pre-split into records and fields — $1, $2, $0, with NR, NF and FS as built-ins — so the parsing every other language makes you write is the default state of the world.

T2 — third-party encyclopaedic.

A language that comes with a loop already running

The corpus’s other languages hand you a main and let you build control flow. AWK’s control flow is fixed and implicit: read a record, test the patterns, run the matching actions, repeat. The program supplies only what to do when a pattern hits. That makes it the first source here where the language’s whole shape is a commitment to a data model — line-oriented text in columns — rather than to a memory, concurrency or runtime decision, and none of programming-language‘s axes registers it.

The nearest neighbour in the corpus is prolog (logic-programming): another language where the evaluation machinery is the language’s argument and the program is a set of rules the engine applies. Different machinery — matching against records versus resolution over a proof search — same shift of authority from the program to the interpreter. Set both against evaluation-strategy.

Standard, implementations, descendants

AWK is mandatory in the POSIX Single UNIX Specification and required by the Linux Standard Base, which puts it with c, common-lisp and scheme in the small set of corpus languages defined by a document rather than by a vendor — and it is the only one whose specification is part of an operating-system standard (language-governance). Implementations diverge underneath it exactly as that model predicts: Kernighan’s nawk (1993), the “one true AWK”; gawk, maintained by Arnold Robbins since 1994, with internationalization and networking extensions; mawk, a fast bytecode interpreter; BusyBox’s minimal build for embedded systems.

Perl (1987) took the text-processing model and generalized it, which is the corpus’s first documented case of one language’s design being absorbed by a successor rather than a dialect.

programming-language · prolog · logic-programming · evaluation-strategy · language-governance · bash · synthesis