Ravi Sir's Cards › AWS
BEGIN vs END
This comparison card contrasts BEGIN and END. BEGIN is described as before the first line. END is described as after the last line.
Read card text
What this card says
Runs
BEGIN
Before the first line.
END
After the last line.
Key points
Set FS, OFS, headers.
Print totals.
Example
awk 'BEGIN{FS=","}'
Use when
Setup.
Summary.