These commands are available on POSIX compliant systems, as well as on traditional Unix based systems. If you are using some other operating system, you still need to be familiar with the ideas of I/O redirection and pipes.
Often, these systems
gawk for their
The `#!' mechanism works on Linux systems, Unix systems derived from Berkeley Unix, System V Release 4, and some System V Release 3 systems.
line beginning with `#!' lists the full file name of an interpreter
to be run, and an optional initial command line argument to pass to that
interpreter. The operating system then runs the interpreter with the given
argument and the full argument list of the executed program. The first argument
in the list is the full file name of the
awk program. The rest of the
argument list will either be options to
awk, or data files,
awk, newlines are not
considered whitespace for separating fields.
sed utility is a "stream editor."
Its behavior is also defined by the POSIX standard.
The internal representation uses double-precision floating point numbers. If you don't know what that means, then don't worry about it.
awk, newline does not count as whitespace.
Some early implementations of Unix
"-", even if there were data files to be
processed. This behavior was incorrect, and should not be relied
upon in your programs.
Computer generated random numbers really are not truly random. They are technically known as "pseudo-random." This means that while the numbers in a sequence appear to be random, you can in fact generate the same sequence of random numbers over and over again.
This consequence was certainly unintended.
As of February 1997, with final approval and publication hopefully sometime in 1997.
A program is interactive if the standard output is connected to a terminal device.
Occasionally there are minutes in a year with a leap second, which is why the seconds can go up to 60.
This is because ANSI C leaves the
behavior of the C version of
strftime undefined, and
will use the system's version of
strftime if it's there.
Typically, the conversion specifier will either not appear in the
returned string, or it will appear literally.
If you don't understand any of this, don't worry about it; these facilities are meant to make it easier to "internationalize" programs.
Your version of
may use a directory that is different than `/usr/local/share/awk'; it
will depend upon how
gawk was built and installed. The actual
directory will be the value of `$(datadir)' generated when
gawk was configured. You probably don't need to worry about this
Some implementations of
awk do not allow you to
next from within a function body. Some other work-around
will be necessary if you use such a version.
has been extended in many countries to use the values from 128 to 255
for country-specific characters. If your system uses these extensions,
you can simplify
_ord_init to simply loop from zero to 255.
This is the Epoch on POSIX systems. It may be different on other systems.
Examine the code in
section Noting Data File Boundaries.
wc use a separate
lines variable, instead of using
the value of
On older, non-POSIX systems,
does not require that the lists be enclosed in square brackets and quoted.
This is a feature.
program was written before
gawk acquired the ability to
split each character in a string into separate array elements.
How might this ability simplify the program?
"Real world" is defined as "a program actually used to get something done."
On some very old versions of
awk, the test
`getline junk < t' can loop forever if the file exists but is empty.
The path may use a directory
other than `/usr/local/share/awk', depending upon how
was built and installed.
awk, newline does not separate fields.
This document was generated on 7 November 1998 using the texi2html translator version 1.52.