Go to the previous, next section.
awk
Language
This manual describes the GNU implementation of awk
, which is patterned
after the System V Release 4 version. Many awk
users are only familiar
with the original awk
implementation in Version 7 Unix, which is also
the basis for the version in Berkeley Unix. This chapter briefly describes
the evolution of the awk
language.
The awk
language evolved considerably between the release of
Version 7 Unix (1978) and the new version first made widely available in
System V Release 3.1 (1987). This section summarizes the changes, with
cross-references to further details.
awk
Statements versus Lines).
return
statement
(see section User-defined Functions).
delete
statement (see section The delete
Statement).
do
-while
statement (see section The do
-while
Statement).
atan2
, cos
, sin
, rand
and
srand
(see section Numeric Built-in Functions).
gsub
, sub
, and match
(see section Built-in Functions for String Manipulation).
close
and system
(see section Built-in Functions For Input/Output).
ARGC
, ARGV
, FNR
, RLENGTH
, RSTART
,
and SUBSEP
built-in variables (see section Built-in Variables).
awk
programs (see section Operator Precedence: How Operators Nest).
FS
(see section Specifying How Fields Are Separated), or as the
third argument to the split
function (see section Built-in Functions for String Manipulation).
getline
function (see section Explicit Input with getline
).
BEGIN
and END
rules (see section BEGIN
and END
Special Patterns).
The System V Release 4 version of Unix awk
added these features:
ENVIRON
variable (see section Built-in Variables).
awk
).
awk
).
srand
built-in function
(see section Numeric Built-in Functions).
toupper
and tolower
built-in string functions
for case translation (see section Built-in Functions for String Manipulation).
printf
function (see section Using printf
Statements For Fancier Printing).
/foo/
as expressions, where
they are equivalent to use of the matching operator, as in $0 ~
/foo/
.
gawk
Not In S5R4
The GNU implementation, gawk
, adds these features:
AWKPATH
environment variable for specifying a path search for
the `-f' command line option (see section Invocation of awk
).
awk
).
IGNORECASE
variable and its effects (see section Case-sensitivity in Matching).
awk
).
gawk
will accept (see section Invocation of awk
).
Go to the previous, next section.