Node:Getline Notes, Next:Getline Summary, Previous:Getline/Variable/Coprocess, Up:Getline
getlineHere are some miscellaneous points about getline that
you should bear in mind:
getline changes the value of $0 and NF,
awk does not automatically jump to the start of the
program and start testing the new record against every pattern.
However, the new record is tested against any subsequent rules.
awk implementations limit the number of pipelines that an awk
program may have open to just one. In gawk, there is no such limit.
You can open as many pipelines (and coprocesses) as the underlying operating
system permits.
getline without a
redirection inside a BEGIN rule. Because an unredirected getline
reads from the command-line data files, the first getline command
causes awk to set the value of FILENAME. Normally,
FILENAME does not have a value inside BEGIN rules, because you
have not yet started to process the command-line data files.
(d.c.)
(See The BEGIN and END Special Patterns,
also see Built-in Variables That Convey Information.)