Go to the first, previous, next, last section, table of contents.
getline to Remember
Here are some miscellaneous points about getline that
you should bear in mind:
getline changes the value of $0 and NF,
@command{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.
getline without a
redirection inside a BEGIN rule. Because an unredirected getline
reads from the command-line data files, the first getline command
causes @command{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 section The BEGIN and END Special Patterns,
also see section Built-in Variables That Convey Information.)
Go to the first, previous, next, last section, table of contents.