In other programming languages there often has a
boolean type. I can create a boolean type variable and use the
not operator to toggle it. I can toggle it many times and get a series of true, false, true, false ...
In awk there is no boolean type. Only empty string and the number 0 are considered false. All other values are true. In this case what should I do if I want to do operation A on line 1, 3, 5... and operation B on line 2, 4, 6... The task will very easy if we have a boolean type variable and I can simply