awk
A language for processing fields and records
Introduction
- It is a programming language
awk is an abbreviation of the 3 people who developed it
- It is a part of POSIX, IEEE 1003.1-2008
- Variants of
awk
gawk contains features that extend POSIX
Execution model
- Input stream is a set of records
- By default
“\n” is the record separator
- Each line is a record
- Each record is a sequence of fields
- By default
“ ” is the field separator
- Words are fields
- Splitting of records to fields is done automatically
- Each code block executes on one record at a time, as matched by the pattern of that block
usage