SVR4 (The GNU Awk User’s Guide)
From Get docs
Gawk/docs/latest/SVR4
Next: POSIX, Previous: V7/SVR3.1, Up: Language History [Contents][Index]
A.2 Changes Between SVR3.1 and SVR4
The System V Release 4 (1989) version of Unix awk
added these features (some of which originated in gawk
):
- The
ENVIRON
array (see section Predefined Variables) - Multiple
-f
options on the command line (see section Command-Line Options) - The
-v
option for assigning variables before program execution begins (see section Command-Line Options) - The
--
signal for terminating command-line options - The ‘
\a
’, ‘\v
’, and ‘\x
’ escape sequences (see section Escape Sequences) - A defined return value for the
srand()
built-in function (see section Numeric Functions) - The
toupper()
andtolower()
built-in string functions for case translation (see section String-Manipulation Functions) - A cleaner specification for the ‘
%c
’ format-control letter in theprintf
function (see section Format-Control Letters) - The ability to dynamically pass the field width and precision (
"%*.*d"
) in the argument list ofprintf
andsprintf()
(see section Format-Control Letters) - The use of regexp constants, such as
/foo/
, as expressions, where they are equivalent to using the matching operator, as in ‘$0 ~ /foo/
’ (see section Using Regular Expression Constants) - Processing of escape sequences inside command-line variable assignments (see section Assigning Variables on the Command Line)