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