User Guide : Using Content Extraction Language : Language Syntax and Examples : shift;
 
Share this page             
shift;
This statement shifts the input fields left one field, i.e., $3 becomes $2, $2 becomes $1, and the original $1 is lost. The value of NF becomes less by 1.
Example
while(NF) { fld[ NF ] = $1; shift; } #
Reverse-store fields into array fld[1]
# through fld[NF]