March 2018
Beginner to intermediate
416 pages
9h 24m
English
We can print each input record of the input file in multiple ways, as shown in the following example. All the given examples will produce the same result by printing all the input records of the input file.
In our first example, we specify the empty pattern without any action statement to print each input record of the input file, as follows:
$ awk '//' empinfo.txt
In this example, we specify the print action statement only, without giving any pattern for matching, and print each input record of the input file, as follows:
$ awk '{ print }' empinfo.txt
In this example, we specify the $0 default variable, along with the print action statement, to print each input record of the input file, as follows:
$ awk '{ ...Read now
Unlock full access