Was this helpful?
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]
Last modified date: 07/26/2024