gawk also provides special file names that give access to information
about the running gawk process. Each of these “files” provides
a single record of information. To read them more than once, they must
first be closed with the close
function
(see Close Files And Pipes).
The file names are:
$1
getuid
system call
(the real user ID number).
$2
geteuid
system call
(the effective user ID number).
$3
getgid
system call
(the real group ID number).
$4
getegid
system call
(the effective group ID number).
If there are any additional fields, they are the group IDs returned by
the getgroups
system call.
(Multiple groups may not be supported on all systems.)
These special file names may be used on the command line as data files, as well as for I/O redirections within an awk program. They may not be used as source files with the -f option.
NOTE: The special files that provide process-related information are now considered
obsolete and will disappear entirely
in the next release of gawk.
gawk prints a warning message every time you use one of
these files.
To obtain process-related information, use the PROCINFO
array.
See Auto-set.