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

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004