close(file [, how]) Close file, pipe or co-process. The optional how should only be used when closing one end of a two-way pipe to
a co-process. It must be a string value, either "to" or "from".
system(cmd-line) Execute the command cmd-line, and return the exit status. (This may not be available on non-POSIX systems.)
fflush([file]) Flush any buffers associated with the open output file or pipe file. If file is missing, then standard output
is flushed. If file is the null string, then all open output files and pipes have their buffers flushed.
Additional output redirections are allowed for print and printf.
print ... >> file
Appends output to the file.
print ... | command
Writes on a pipe.
print ... |& command
Sends data to a co-process or socket. (See also the subsection Special File Names, below.)
The getline command returns 1 on success, 0 on end of file, and -1 on an error. Upon an error, ERRNO contains a string describing the
problem.
NOTE: Failure in opening a two-way socket will result in a non-fatal error being returned to the calling function. If using a pipe,
co-process, or socket to getline, or from print or printf within a loop, you must use close() to create new instances of the command
or socket. AWK does not automatically close pipes, sockets, or co-processes when they return EOF.