Go forward to Language Summary.
Go backward to Gawk Summary.
Go up to Gawk Summary.
Command Line Options Summary
============================
The command line consists of options to `gawk' itself, the `awk'
program text (if not supplied via the `-f' option), and values to be
made available in the `ARGC' and `ARGV' predefined `awk' variables:
awk [POSIX OR GNU STYLE OPTIONS] -f source-file [`--'] FILE ...
awk [POSIX OR GNU STYLE OPTIONS] [`--'] 'PROGRAM' FILE ...
The options that `gawk' accepts are:
`-F FS'
`--field-separator=FS'
Use FS for the input field separator (the value of the `FS'
predefined variable).
`-f PROGRAM-FILE'
`--file=PROGRAM-FILE'
Read the `awk' program source from the file PROGRAM-FILE, instead
of from the first command line argument.
`-v VAR=VAL'
`--assign=VAR=VAL'
Assign the variable VAR the value VAL before program execution
begins.
`-W compat'
`--compat'
Specifies compatibility mode, in which `gawk' extensions are turned
off.
`-W copyleft'
`-W copyright'
`--copyleft'
`--copyright'
Print the short version of the General Public License on the error
output. This option may disappear in a future version of `gawk'.
`-W help'
`-W usage'
`--help'
`--usage'
Print a relatively short summary of the available options on the
error output.
`-W lint'
`--lint'
Give warnings about dubious or non-portable `awk' constructs.
`-W posix'
`--posix'
Specifies POSIX compatibility mode, in which `gawk' extensions are
turned off and additional restrictions apply.
`-W source=PROGRAM-TEXT'
`--source=PROGRAM-TEXT'
Use PROGRAM-TEXT as `awk' program source code. This option allows
mixing command line source code with source code from files, and is
particularly useful for mixing command line programs with library
functions.
`-W version'
`--version'
Print version information for this particular copy of `gawk' on
the error output. This option may disappear in a future version
of `gawk'.
`--'
Signal the end of options. This is useful to allow further
arguments to the `awk' program itself to start with a `-'. This
is mainly for consistency with the argument parsing conventions of
POSIX.
Any other options are flagged as invalid, but are otherwise ignored.
See Invoking `awk': Command Line, for more details.