Patterns and Procedures
awk scripts consist of patterns and procedures:
pattern
{procedure
}
Both pattern and { procedure } are optional. If pattern is missing, { procedure } is applied to all lines. If { procedure } is missing, the matched line is printed.
Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.