Node:POSIX/GNU, Next:Contributors, Previous:BTL, Up:Language History
gawk Not in POSIX awkThe GNU implementation, gawk, adds a large number of features.
This section lists them in the order they were added to gawk.
They can all be disabled with either the --traditional or
--posix options
(see Command-Line Options).
Version 2.10 of gawk introduced the following features:
AWKPATH environment variable for specifying a path search for
the -f command-line option
(see Command-Line Options).
IGNORECASE variable and its effects
(see Case Sensitivity in Matching).
/dev/stdin, /dev/stdout, /dev/stderr and
/dev/fd/N special file names
(see Special File Names in gawk).
Version 2.13 of gawk introduced the following features:
FIELDWIDTHS variable and its effects
(see Reading Fixed-Width Data).
systime and strftime built-in functions for obtaining
and printing timestamps
(see Using gawk's Timestamp Functions).
-W lint option to provide error and portability checking
for both the source code and at runtime
(see Command-Line Options).
-W compat option to turn off the GNU extensions
(see Command-Line Options).
-W posix option for full POSIX compliance
(see Command-Line Options).
Version 2.14 of gawk introduced the following feature:
next file statement for skipping to the next data file
(see Using gawk's nextfile Statement).
Version 2.15 of gawk introduced the following features:
ARGIND variable, which tracks the movement of FILENAME
through ARGV (see Built-in Variables).
ERRNO variable, which contains the system error message when
getline returns -1 or close fails
(see Built-in Variables).
/dev/pid, /dev/ppid, /dev/pgrpid, and
/dev/user file name interpretation
(see Special File Names in gawk).
delete array
(see The delete Statement).
--
(see Command-Line Options).
--source option for mixing command-line and library-file
source code
(see Command-Line Options).
Version 3.0 of gawk introduced the following features:
IGNORECASE changed, now applying to string comparison as well
as regexp operations
(see Case Sensitivity in Matching).
RT variable that contains the input text that
matched RS
(see How Input Is Split into Records).
gensub function for more powerful text manipulation
(see String Manipulation Functions).
strftime function acquired a default time format,
allowing it to be called with no arguments
(see Using gawk's Timestamp Functions).
FS and for the third
argument to split to be null strings
(see Making Each Character a Separate Field).
RS to be a regexp
(see How Input Is Split into Records).
next file statement became nextfile
(see Using gawk's nextfile Statement).
--lint-old option to
warn about constructs that are not available in
the original Version 7 Unix version of awk
(see Major Changes Between V7 and SVR3.1).
-m option and the fflush function from the
Bell Laboratories research version of awk
(see Command-Line Options; also
see Input/Output Functions).
--re-interval option to provide interval expressions in regexps
(see Regular Expression Operators).
--traditional option was added as a better name for
--compat (see Command-Line Options).
gawk for Unix).
gawk on an Amiga).
Version 3.1 of gawk introduced the following features:
BINMODE special variable for non-POSIX systems,
which allows binary I/O for input and/or output files
(see Using gawk on PC Operating Systems).
LINT special variable, which dynamically controls lint warnings
(see Built-in Variables).
PROCINFO array for providing process-related information
(see Built-in Variables).
TEXTDOMAIN special variable for setting an application's
internationalization text domain
(see Built-in Variables,
and
Internationalization with gawk).
awk
program source code
(see Octal and Hexadecimal Numbers).
|& operator for two-way I/O to a coprocess
(see Two-Way Communications with Another Process).
/inet special files for TCP/IP networking using |&
(see Using gawk for Network Programming).
close that allows closing one end
of a two-way pipe to a coprocess
(see Two-Way Communications with Another Process).
match function
for capturing text-matching subexpressions within a regexp
(see String Manipulation Functions).
printf formats for
making translations easier
(see Rearranging printf Arguments).
asort function for sorting arrays
(see Sorting Array Values and Indices with gawk).
bindtextdomain and dcgettext functions
for internationalization
(see Internationalizing awk Programs).
extension built-in function and the ability to add
new built-in functions dynamically
(see Adding New Built-in Functions to gawk).
mktime built-in function for creating timestamps
(see Using gawk's Timestamp Functions).
and,
or,
xor,
compl,
lshift,
rshift,
and
strtonum built-in
functions
(see Using gawk's Bit Manipulation Functions).
next file as two words was removed completely
(see Using gawk's nextfile Statement).
--dump-variables option to print a list of all global variables
(see Command-Line Options).
--gen-po command-line option and the use of a leading
underscore to mark strings that should be translated
(see Extracting Marked Strings).
--non-decimal-data option to allow non-decimal
input data
(see Allowing Nondecimal Input Data).
--profile option and pgawk, the
profiling version of gawk, for producing execution
profiles of awk programs
(see Profiling Your awk Programs).
--enable-portals configuration option to enable special treatment of
pathnames that begin with /p as BSD portals
(see Using gawk with BSD Portals).
gawk for Unix).
gettext for gawk's own message output
(see gawk Can Speak Your Language).
gawk on BeOS).
gawk on a Tandem).
gawk on the Atari ST).
ansi2knr to convert the code on systems with old compilers.