The break statement causes an immediate exit from an enclosing while or for, thereby preventing further iterations from being performed. The continue statement causes the next iteration to begin. The next statement causes awk to skip immediately to the next record and begin matching patterns starting from the first pattern-action statement.
The exit statement causes the program to behave as if the
end of the input had occurred; no more input is read, and the
END action, if any, is executed. Within the END
action, the following statement causes the program to return the
value of expr as its exit status:
If there is no expr, the exit status is zero.