goelweb.com --> Software --> awk --> awk Operators

awk Operators (increasing order of precedence)

= += -= *= /= %=
assignment; v op= expr is v = v op (expr)
||
OR: expr1 || expr2 true if either is; expr2 is not evaluated if expr1 is true
&&
AND: expr1 && expr2 true is both are; expr2 is not evaluated is expr1 is false
!
negate values of express
> >= < <= == != ~ !~
relational operators; ~ and ! are match and non-match
nothing
string concatenation
+ -
plus, minus
* / %
multiply, divide, remainder
++ --
increment, decrement (prefix or postfix)
rishi.goel@alumni.usc.edu