Reference: if
Author: Daniel Gilly & the Staff of O'Reilly & Associates
Date: 1998-08-06T22:00:25Z

#

| Chapter 11 The Awk Scripting Language |

## if

    if (condition)
          command
    [else]
          [command]

If `condition` is true, do `command(s)`, otherwise do `command` in else clause. Condition can be an expression using any of the relational operators <, <=, ==, !=, >=, or >, as well as the pattern-matching operator ~ (e.g., "if ($1 ~ /[`Aa`].*/)"). A series of commands must be put within braces.

Reference: gsub |  | Reference: index