Sources of data

If you do not specify a data file on the command line, awk begins to read data from standard input. For example, if you enter the command:
awk '{ print $1 }'
awk prints the first word of every line you type. When you type in data from the workstation, press <Enter> at the end of each line. To stop passing data to awk, type <EscChar-D> and press <Enter>.
A command line may also specify several data files, as in:
awk -f progfile data1 data2 data3 ...
When awk has finished reading through the first data file data1, it goes on to data2, and so on.