11.5. Operators

 < Day Day Up > 

The following table lists the operators , in order of increasing precedence, that are available in awk.

Symbol

Meaning

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

Assignment

?:

C conditional expression

||

Logical OR (short-circuit)

&&

Logical AND (short-circuit)

in

Array membership

~ !~

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


While ** and **= are common extensions, they are not part of POSIX awk .


     < Day Day Up > 


    Unix in a Nutshell
    Unix in a Nutshell, Fourth Edition
    ISBN: 0596100299
    EAN: 2147483647
    Year: 2005
    Pages: 201

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net