gawk: Naming Standard Input

1 
1 2.4 Naming Standard Input
1 =========================
1 
1 Often, you may wish to read standard input together with other files.
1 For example, you may wish to read one file, read standard input coming
1 from a pipe, and then read another file.
1 
1    The way to name the standard input, with all versions of 'awk', is to
1 use a single, standalone minus sign or dash, '-'.  For example:
1 
1      SOME_COMMAND | awk -f myprog.awk file1 - file2
1 
1 Here, 'awk' first reads 'file1', then it reads the output of
1 SOME_COMMAND, and finally it reads 'file2'.
1 
1    You may also use '"-"' to name standard input when reading files with
1 'getline' (⇒Getline/File).
1 
1    In addition, 'gawk' allows you to specify the special file name
1 '/dev/stdin', both on the command line and with 'getline'.  Some other
1 versions of 'awk' also support this, but it is not standard.  (Some
1 operating systems provide a '/dev/stdin' file in the filesystem;
1 however, 'gawk' always processes this file name itself.)
1