manpagez: man pages & more
info gawk
Home | html | info | man

gawk: Getline Summary

 
 4.10.10 Summary of 'getline' Variants
 -------------------------------------
 
 ⇒Table 4.1 table-getline-variants. summarizes the eight variants
 of 'getline', listing which predefined variables are set by each one,
 and whether the variant is standard or a 'gawk' extension.  Note: for
 each variant, 'gawk' sets the 'RT' predefined variable.
 
 Variant                  Effect                      'awk' / 'gawk'
 -------------------------------------------------------------------------
 'getline'                Sets '$0', 'NF', 'FNR',     'awk'
                          'NR', and 'RT'
 'getline' VAR            Sets VAR, 'FNR', 'NR',      'awk'
                          and 'RT'
 'getline <' FILE         Sets '$0', 'NF', and 'RT'   'awk'
 'getline VAR < FILE'     Sets VAR and 'RT'           'awk'
 COMMAND '| getline'      Sets '$0', 'NF', and 'RT'   'awk'
 COMMAND '| getline'      Sets VAR and 'RT'           'awk'
 VAR
 COMMAND '|& getline'     Sets '$0', 'NF', and 'RT'   'gawk'
 COMMAND '|& getline'     Sets VAR and 'RT'           'gawk'
 VAR
 
 Table 4.1: 'getline' variants and what they set
 
© manpagez.com 2000-2018
Individual documents may contain additional copyright information.