Name
close
Synopsis
close(expr
) close(expr
,how
){G}
In most implementations of awk, you can only have up to 10 files
open simultaneously and one pipe. Therefore, POSIX awk provides a close()
function that allows you to
close a file or a pipe. It takes the same expression that opened
the pipe or file as an argument. This expression must be
identical, character by character, to the one that opened the file
or pipe—even whitespace is significant.
In the second form, close one end of either a TCP/IP socket
or a two-way pipe to a coprocess. how is a
string, either "from"
or
"to"
. Case does not
matter.
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.