The GNU implementation, gawk, adds a large number of features. They can all be disabled with either the --traditional or --posix options (see Options).
A number of features have come and gone over the years. This section summarizes the additional features over POSIX awk that are in the current version of gawk.
ARGIND
BINMODE
,
ERRNO
,
FIELDWIDTHS
,
FPAT
,
IGNORECASE
,
LINT
,
PROCINFO
,
RT
,
and
TEXTDOMAIN
variables
(see Built-in Variables).
FS
and for the third
argument to split()
to be null strings
(see Single Character Fields).
RS
to be a regexp
(see Records).
BEGINFILE
and ENDFILE
special patterns.
(see BEGINFILE/ENDFILE).
nextfile
statement
(see Nextfile Statement).
switch
statement
(see Switch Statement).
close()
that allows closing one end
of a two-way pipe to a coprocess
(see Two-way I/O).
gsub()
and sub()
.
length()
function accepts an array argument
and returns the number of elements in the array
(see String Functions).
match()
function
for capturing text-matching subexpressions within a regexp
(see String Functions).
printf
formats for
making translations easier
(see Printf Ordering).
split()
function's additional optional fourth
argument which is an array to hold the text of the field separators.
(see String Functions).
and()
,
compl()
,
lshift()
,
or()
,
rshift()
,
and
xor()
functions for bit manipulation
(see Bitwise Functions).
asort()
and asorti()
functions for sorting arrays
(see Array Sorting).
bindtextdomain()
, dcgettext()
and dcngettext()
functions for internationalization
(see Programmer i18n).
extension()
built-in function and the ability to add
new functions dynamically
(see Dynamic Extensions).
fflush()
function from Brian Kernighan's
version of awk
(see I/O Functions).
gensub()
, patsplit()
, and strtonum()
functions
for more powerful text manipulation
(see String Functions).
mktime()
, systime()
, and strftime()
functions for working with timestamps
(see Time Functions).