UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 11.4 Built-in VariablesChapter 11
The awk Programming Language
Next: 11.6 Variables and Array Assignments
 

11.5 Operators

The following table lists the operators, in order of increasing precedence, that are available in awk. Note: while ** and **= are common extensions, they are not part of POSIX awk.

SymbolMeaning

= += -= *= /= %= ^= **=

Assignment
?:C conditional expression (nawk only)
||Logical OR (short-circuit)
&&Logical AND (short-circuit)
inArray membership (nawk only)
~ !~Match regular expression and negation
< <= > >= != ==Relational operators
(blank)Concatenation
+ -Addition, subtraction
* / %Multiplication, division, and modulus (remainder)
+ - !Unary plus and minus, and logical negation
^ **Exponentiation
++ -- Increment and decrement, either prefix or postfix
$Field reference


Previous: 11.4 Built-in VariablesUNIX in a Nutshell: System V EditionNext: 11.6 Variables and Array Assignments
11.4 Built-in VariablesBook Index11.6 Variables and Array Assignments

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System