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

Some lexical conventions

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 comment
Statements 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.


Next topic: awk output
Previous topic: User-defined functions

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003