There are several ways to run an
awk program. If the program is
short, it is easiest to include it in the command that runs
awk 'program' input-file1 input-file2 ...
where program consists of a series of patterns and actions, as
(The reason for the single quotes is described below, in
section One-shot Throw-away
When the program is long, it is usually more convenient to put it in a file and run it with a command like this:
awk -f program-file input-file1 input-file2 ...
Go to the first, previous, next, last section, table of contents.