AWK is a powerful text-processing language and tool designed for pattern scanning and data extraction. Named after its creators (Aho, Weinberger, Kernighan), it excels at processing structured text data like CSV, log files, and output from other commands. GNU Awk (gawk) is the most common implementation.
Key Features
Field-Based Processing — Automatically split input into fields by delimiter
Pattern-Action Pairs — Execute actions only when patterns match
Built-in Variables — NR, NF, FS, OFS, and many more for flexible processing
Associative Arrays — Powerful in-memory data structures for aggregation
File-Level Control — Process multiple files, track filenames and records