gawk: Command Line
1
1 2.1 Invoking 'awk'
1 ==================
1
1 There are two ways to run 'awk'--with an explicit program or with one or
1 more program files. Here are templates for both of them; items enclosed
1 in [...] in these templates are optional:
1
1 'awk' [OPTIONS] '-f' PROGFILE ['--'] FILE ...
1 'awk' [OPTIONS] ['--'] ''PROGRAM'' FILE ...
1
1 In addition to traditional one-letter POSIX-style options, 'gawk'
1 also supports GNU long options.
1
1 It is possible to invoke 'awk' with an empty program:
1
1 awk '' datafile1 datafile2
1
1 Doing so makes little sense, though; 'awk' exits silently when given an
1 empty program. (d.c.) If '--lint' has been specified on the command
1 line, 'gawk' issues a warning that the program is empty.
1