Go to the first, previous, next, last section, table of contents.
This Info file describes the GNU implementation of @command{awk}, which follows the POSIX specification. Many long-time @command{awk} users learned @command{awk} programming with the original @command{awk} implementation in Version 7 Unix. (This implementation was the basis for @command{awk} in Berkeley Unix, through 4.3--Reno. Subsequent versions of Berkeley Unix, and systems derived from 4.4BSD--Lite, use various versions of @command{gawk} for their @command{awk}.) This major node briefly describes the evolution of the @command{awk} language, with cross references to other parts of the Info file where you can find more information.
The @command{awk} language evolved considerably between the release of Version 7 Unix (1978) and the new version that was first made generally available in System V Release 3.1 (1987). This minor node summarizes the changes, with cross-references to further details:
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 Functions).
gsub, sub, and match
(see section String Manipulation Functions).
close and system
(see section Input/Output Functions).
ARGC, ARGV, FNR, RLENGTH, RSTART,
and SUBSEP built-in variables (see section Built-in Variables).
FS
(see section Specifying How Fields Are Separated) and as the
third argument to the split function
(see section String Manipulation Functions).
getline function
(see section Explicit Input with getline).
BEGIN and END rules
(see section The BEGIN and END Special Patterns).
The System V Release 4 (1989) version of Unix @command{awk} added these features (some of which originated in @command{gawk}):
ENVIRON variable (see section Built-in Variables).
srand built-in function
(see section Numeric Functions).
toupper and tolower built-in string functions
for case translation
(see section String Manipulation Functions).
printf function
(see section Format-Control Letters).
"%*.*d")
in the argument list of the printf function
(see section Format-Control Letters).
/foo/, as expressions, where
they are equivalent to using the matching operator, as in `$0 ~ /foo/'
(see section Using Regular Expression Constants).
The POSIX Command Language and Utilities standard for @command{awk} (1992) introduced the following changes into the language:
CONVFMT for controlling the conversion of numbers
to strings (see section Conversion of Strings and Numbers).
The following common extensions are not permitted by the POSIX standard:
\x escape sequences are not recognized
(see section Escape Sequences).
FS is
equal to a single space
(see section Examining Fields).
func for the keyword function is not
recognized (see section Function Definition Syntax).
FS to be a single tab character
(see section Specifying How Fields Are Separated).
fflush built-in function is not supported
(see section Input/Output Functions).
Brian Kernighan, one of the original designers of Unix @command{awk}, has made his version available via his home page (@pxref{Other Versions, ,Other Freely Available @command{awk} Implementations}). This minor node describes extensions in his version of @command{awk} that are not in POSIX @command{awk}.
fflush built-in function for flushing buffered output
(see section Input/Output Functions).
func as an abbreviation for function
(see section Function Definition Syntax).
The Bell Laboratories @command{awk} also incorporates the following extensions, originally developed for @command{gawk}:
FS and for the third
argument to split to be null strings
(see section Making Each Character a Separate Field).
nextfile statement
(@pxref{Nextfile Statement, ,Using @command{gawk}'s nextfile Statement}).
delete Statement).
The GNU implementation, @command{gawk}, adds a large number of features. This minor node lists them in the order they were added to @command{gawk}. They can all be disabled with either the @option{--traditional} or @option{--posix} options (see section Command-Line Options).
Version 2.10 of @command{gawk} introduced the following features:
IGNORECASE variable and its effects
(see section Case Sensitivity in Matching).
Version 2.13 of @command{gawk} introduced the following features:
FIELDWIDTHS variable and its effects
(see section Reading Fixed-Width Data).
systime and strftime built-in functions for obtaining
and printing timestamps
(@pxref{Time Functions, ,Using @command{gawk}'s Timestamp Functions}).
Version 2.14 of @command{gawk} introduced the following feature:
next file statement for skipping to the next data file
(@pxref{Nextfile Statement, ,Using @command{gawk}'s nextfile Statement}).
Version 2.15 of @command{gawk} introduced the following features:
ARGIND variable, which tracks the movement of FILENAME
through ARGV (see section Built-in Variables).
ERRNO variable, which contains the system error message when
getline returns -1 or when close fails
(see section Built-in Variables).
delete Statement).
Version 3.0 of @command{gawk} introduced the following features:
IGNORECASE changed, now applying to string comparison as well
as regexp operations
(see section Case Sensitivity in Matching).
RT variable that contains the input text that
matched RS
(see section How Input Is Split into Records).
gensub function for more powerful text manipulation
(see section String Manipulation Functions).
strftime function acquired a default time format,
allowing it to be called with no arguments
(@pxref{Time Functions, ,Using @command{gawk}'s Timestamp Functions}).
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).
next file statement became nextfile
(@pxref{Nextfile Statement, ,Using @command{gawk}'s nextfile Statement}).
fflush function from the
Bell Laboratories research version of @command{awk}
(see section Command-Line Options; also
see section Input/Output Functions).
Version 3.1 of @command{gawk} introduced the following features:
BINMODE special variable for non-POSIX systems,
which allows binary I/O for input and/or output files
(@pxref{PC Using, ,Using @command{gawk} on PC Operating Systems}).
LINT special variable, which dynamically controls lint warnings
(see section Built-in Variables).
PROCINFO array for providing process-related information
(see section Built-in Variables).
TEXTDOMAIN special variable for setting an application's
internationalization text domain
(see section Built-in Variables,
and
@ref{Internationalization, ,Internationalization with @command{gawk}}).
close that allows closing one end
of a two-way pipe to a coprocess
(see section Two-Way Communications with Another Process).
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).
asort function for sorting arrays
(@pxref{Array Sorting, ,Sorting Array Values and Indices with @command{gawk}}).
bindtextdomain and dcgettext functions
for internationalization
(@pxref{Programmer i18n, ,Internationalizing @command{awk} Programs}).
extension built-in function and the ability to add
new built-in functions dynamically
(@pxref{Dynamic Extensions, , Adding New Built-in Functions to @command{gawk}}).
mktime built-in function for creating timestamps
(@pxref{Time Functions, ,Using @command{gawk}'s Timestamp Functions}).
and,
or,
xor,
compl,
lshift,
rshift,
and
strtonum built-in
functions
(@pxref{Bitwise Functions, ,Using @command{gawk}'s Bit Manipulation Functions}).
nextfile Statement}).
gettext for @command{gawk}'s own message output
(@pxref{Gawk I18N, ,@command{gawk} Can Speak Your Language}).
Always give credit where credit is due.
Anonymous
This minor node names the major contributors to @command{gawk} and/or this Info file, in approximate chronological order:
extension
built-in function for dynamically adding new modules.
gettext.
asort function
as well as the code for the new optional third argument to the match function.
Go to the first, previous, next, last section, table of contents.