Site icon LinuxCommands.site

AWK tutorial: awk workflow

AWK follows a simple workflow − Read, Execute, and Repeat.

BODY block

This block is the core of the awk command. It consists of three parts.

AWK reads a line from the input stream (file, pipe, or stdin) and stores it in memory.

All awk commands are applied sequentially on the input. By default, AWK executes commands for each line entered. However, we can restrict it to a specified pattern.

This process repeats until the file reaches its end.

More about awk:

Exit mobile version