Skip to content
masterclass Buddy

Linux & Shell · Command

awk

awk scans text records, splits them into fields, and runs actions for records that match program patterns. It supports input files, standard input, variable assignments, and BEGIN and END processing.

Last updated

Syntax

awk [ -F sepstring ] [ -v assignment ] ... program [ argument ... ]
awk [ -F sepstring ] -f progfile [ -f progfile ] ... [ -v assignment ] ... [ argument ... ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BEGIN
  • END
  • RS
  • FS
  • -F
  • -f
  • -v
  • $0

Source: awk(1p) - Linux manual page. Checked 2026-11-03.