gawk: Invoking Summary
2.11 Summary
============
* Use either 'awk 'PROGRAM' FILES' or 'awk -f PROGRAM-FILE FILES' to
run 'awk'.
* The three standard options for all versions of 'awk' are '-f',
'-F', and '-v'. 'gawk' supplies these and many others, as well as
corresponding GNU-style long options.
* Nonoption command-line arguments are usually treated as file names,
unless they have the form 'VAR=VALUE', in which case they are taken
as variable assignments to be performed at that point in processing
the input.
* All nonoption command-line arguments, excluding the program text,
are placed in the 'ARGV' array. Adjusting 'ARGC' and 'ARGV'
affects how 'awk' processes input.
* You can use a single minus sign ('-') to refer to standard input on
the command line. 'gawk' also lets you use the special file name
'/dev/stdin'.
* 'gawk' pays attention to a number of environment variables.
'AWKPATH', 'AWKLIBPATH', and 'POSIXLY_CORRECT' are the most
important ones.
* 'gawk''s exit status conveys information to the program that
invoked it. Use the 'exit' statement from within an 'awk' program
to set the exit status.
* 'gawk' allows you to include other 'awk' source files into your
program using the '@include' statement and/or the '-i' and '-f'
command-line options.
* 'gawk' allows you to load additional functions written in C or C++
using the '@load' statement and/or the '-l' option. (This advanced
feature is described later, in Dynamic Extensions.)