Go to the first, previous, next, last section, table of contents.


Expressions as Action Statements

Expressions are the basic building block of awk actions. An expression evaluates to a value, which you can print, test, store in a variable or pass to a function. But beyond that, an expression can assign a new value to a variable or a field, with an assignment operator.

An expression can serve as a statement on its own. Most other kinds of statements contain one or more expressions which specify data to be operated on. As in other languages, expressions in awk include variables, array references, constants, and function calls, as well as combinations of these with various operators.


Go to the first, previous, next, last section, table of contents.