[prev] [index] [next]

awk: a programmable filter (cont)

Awk programs consist of a sequence of

Pattern { Action Statements; }

and function definitions, where Pattern is one of

  • /Regexp/ ... matches contents of line
  • BEGIN ... actions executed before first line read
  • END ... actions executed after last line read
The Action Statements contain C-like syntax.