DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with awk

Some lexical conventions

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.


Next topic: Output
Previous topic: User-defined functions

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005