In the preceding syntax, program is an awk program that you include on the command line. The program-file is the name of the file that holds an awk program. Putting the program on the command line allows you to write short awk programs without having to create a separate program-file. To prevent the shell from interpreting the awk commands as shell commands, enclose the program within single quotation marks. Putting a long or complex program in a file can reduce errors and retyping. The file-list contains pathnames of the ordinary files that awk processes. These files are the input files. When you do not specify a file-list, awk takes input from standard input or as specified by getline (page 634). |