[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
    QTAwk recognizes programs in the following format:

                            pattern { action }

    Patterns control the  execution of actions.   When a  pattern matches a
    record, the associated action is  executed.  Patterns consist of  valid
    QTAwk  expressions  or  regular  expressions.    Note that the sequence
    operator acquires a  special meaning in  pattern expressions and  loses
    its meaning as a sequence operator.

    QTAwk recognizes the following type of patterns:

    1. { action }

    The pattern is assumed TRUE for every record and the action is executed
    for all records.

    2. expression { action }

    The actions are executed for each record for which expression evaluates
    to nonzero.

    3. /regular expression/ { action }

    The  actions  are  executed  for  each  record  for  which  the regular
    expression matches a string in the record

    4. compound pattern { action }

    Compound  Pattern.    The  pattern  combines  regular  expressions with
    logical NOT, '!',  logical AND, '&&',  logical OR, '||',  bit-wise AND,
    '&', bit-wise  OR, '|',  bit-wise XOR,  '@', the  relational operators,
    '<=', '<', '>',  '>=', the equality  operators, '==' and  '!=', and the
    matching operators,  '~~' and  '!~'.   The action  is executed for each
    record for which the compound pattern is nonzero.

    5. pattern1 , pattern2 { action }

    Range Pattern.  The action is  executed for the first record for  which
    pattern1 is TRUE and every  record until pattern2 evaluates TRUE.   The
    range  is  inclusive.    This  illustrates  the  special meaning of the
    sequence operator in patterns.

    6. predefined pattern { action }

    The predefined patterns are

    BEGIN { action }

    INITIAL { action }
    or
    INITIALIZE { action }

    GROUP /re/ [ { action } ]
      .
      .
      .
    GROUP /re/ [ { action } ]

    NOMATCH { action }

    FINAL { action }
    or
    FINALIZE { action }

    END ( action )

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson