Next: Feature History, Previous: BTL, Up: Language History [Contents][Index]
gawk
Not in POSIX awk
The GNU implementation, gawk
, adds a large number of features.
They can all be disabled with either the --traditional or
--posix options
(see section Command-Line 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 section Predefined Variables)
gawk
)
gawk
for Network Programming)
FS
and for the third
argument to split()
to be null strings
(see section Making Each Character a Separate Field)
RS
to be a regexp
(see section How Input Is Split into Records)
awk
program source code
(see section Octal and Hexadecimal Numbers)
print
and printf
need not be fatal
(see section Enabling Nonfatal Output)
BEGINFILE
and ENDFILE
special patterns
(see section The BEGINFILE
and ENDFILE
Special Patterns)
switch
statement
(see section The switch
Statement)
awk
functions:
close()
that allows closing one end
of a two-way pipe to a coprocess
(see section Two-Way Communications with Another Process)
gsub()
and sub()
with --posix
length()
function accepts an array argument
and returns the number of elements in the array
(see section String-Manipulation Functions)
match()
function
for capturing text-matching subexpressions within a regexp
(see section String-Manipulation Functions)
printf
formats for
making translations easier
(see section Rearranging printf
Arguments)
split()
function’s additional optional fourth
argument, which is an array to hold the text of the field separators
(see section String-Manipulation Functions)
gawk
:
gensub()
, patsplit()
, and strtonum()
functions
for more powerful text manipulation
(see section String-Manipulation Functions)
asort()
and asorti()
functions for sorting arrays
(see section Controlling Array Traversal and Array Sorting)
mktime()
, systime()
, and strftime()
functions for working with timestamps
(see section Time Functions)
and()
,
compl()
,
lshift()
,
or()
,
rshift()
,
and
xor()
functions for bit manipulation
(see section Bit-Manipulation Functions)
isarray()
function to check if a variable is an array or not
(see section Getting Type Information)
bindtextdomain()
, dcgettext()
, and dcngettext()
functions for internationalization
(see section Internationalizing awk
Programs)
AWKPATH
environment variable for specifying a path search for
the -f command-line option
(see section Command-Line Options)
AWKLIBPATH
environment variable for specifying a path search for
the -l command-line option
(see section Command-Line Options)
gawk
version 4.0:
gawk
version 4.1:
gawk
version 4.2:
Next: Feature History, Previous: BTL, Up: Language History [Contents][Index]