May 2018
Beginner
332 pages
7h 28m
English
Let's understand how the awk program processes every line. We will consider a simple file, sample.txt:
$ cat sample.txt
Happy Birth Day
We should live every day.
Let's consider the following awk command:
$ awk '{print $1, $3}' sample.txt
The following diagram shows how awk will process every line in memory:

An explanation of the preceding diagram is as follows: