Go to the first, previous, next, last section, table of contents.
Here is a list of things to bear in mind when using the
special file names that @command{gawk} provides.
-
Recognition of these special file names is disabled if @command{gawk} is in
compatibility mode (see section Command-Line Options).
-
@ifnottex
The
@ifnotinfo
As mentioned earlier, the
special files that provide process-related information are now considered
obsolete and will disappear entirely
in the next release of @command{gawk}.
@command{gawk} prints a warning message every time you use one of
these files.
@ifnottex
To obtain process-related information, use the
PROCINFO array.
See section Built-in Variables.
-
Starting with version 3.1, @command{gawk} always
interprets these special file names.(18) would only interpret these names internally if the system
did not actually have a a `/dev/fd' directory or any of the other
above listed special files. Usually this didn't make a difference,
but sometimes it did; thus, it was decided to make @command{gawk}'s
behavior consistent on all systems and to have it always interpret
the special file names itself.}
For example, using `/dev/fd/4'
for output actually writes on file descriptor 4, and not on a new
file descriptor that is
dup'ed from file descriptor 4. Most of
the time this does not matter; however, it is important to not
close any of the files related to file descriptors 0, 1, and 2.
Doing so results in unpredictable behavior.
Go to the first, previous, next, last section, table of contents.