|
|
Comments may be placed in awk programs; they begin with the character # and end at the end of the line, as in
print x, y # this is a comment
Statements in an awk program normally occupy a single line. Several statements may occur on a single line if they are separated by semicolons. A long statement may be continued over several lines by terminating each continued line by a backslash. (It is not possible to continue a ``...'' string.) This explicit continuation is rarely necessary, however, since statements continue automatically if the line ends with a comma. (For example, this might occur in a print or printf statement) or after the operators && and ||.
Several pattern-action statements may appear on a single line if separated by semicolons.