From Gawk's manual:
When awk statements within one rule are short, you might want to put more than one of them on a line. This is accomplished by separating the statements with a semicolon (‘;’). This also applies to the rules themselves. Thus, the program shown at the start of this section could also be written this way:
/12/ { print $0 } ; /21/ { print $0 }NOTE: The requirement that states that rules on the same line must be sepa rated with a semicolon was not in the original awk language; it was added for consistency with the treatment of statements within an action.
But I have seen from https://stackoverflow.com/q/20262869/156458
awk '$2=="no"{$3="N/A"}1' file
Aren't $2=="no"{$3="N/A"} and 1 two statements? why are they not separated by anything?
Thanks.