@Mouli This is one of the beauties of
awk
: an entire record (here: a line) is referred to as $0
; it is composed of the different fields into which it is automatically split based on the input field separator: $1
, $2
, etc. By assigning to $6
, we update both $6
and $0
, and $0
is what is eventually output by the print
statement (print
without arguments means print $0
). So everything that is not explicitly updated simply remains the same.