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:
gawk [POSIX or GNU style options] -f source-file [--
] file ... gawk [POSIX or GNU style options] [--
] 'program' file ...
The options that gawk
accepts are:
-F fs
--field-separator fs
FS
predefined variable).
-f program-file
--file program-file
awk
program source from the file program-file, instead
of from the first command line argument.
-mf NNN
-mr NNN
gawk
, since gawk
has no predefined limits; they are only for compatibility with the
Bell Labs research version of Unix awk
.
-v var=val
--assign var=val
-W traditional
-W compat
--traditional
--compat
gawk
extensions are turned
off.
-W copyleft
-W copyright
--copyleft
--copyright
gawk
.
-W help
-W usage
--help
--usage
-W lint
--lint
awk
constructs.
-W lint-old
--lint-old
awk
.
-W posix
--posix
gawk
extensions
are turned off and additional restrictions apply.
-W re-interval
--re-interval
-W source=program-text
--source program-text
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
gawk
on the error
output.
--
awk
program itself to start with a `-'. This is mainly for
consistency with POSIX argument parsing conventions.
Any other options are flagged as invalid, but are otherwise ignored. See section Command Line Options, for more details.
Go to the first, previous, next, last section, table of contents.