next up previous contents
Next: Examples Up: findthe file Previous: Actions

Operators

There are a number of operators; here there is a list, in order of decreasing precedence.

( expr )
forces the precedence order. The parentheses must of course be quoted, as they are meaningful for the shell too.

! expr
-not expr
change the truth value of expression, that is if expr is true, it becomes false. The exclamation mark needn't be escaped, because it is followed by a white space.

expr1 expr2
expr1 -a expr2
expr1 -and expr2
all correspond to the logical AND operation, which in the first and most common case is implied. expr2 is not evaluated, if expr1 is false.

expr1 -o expr2
expr1 -or expr2
correspond to the logical OR operation. expr2 is not evaluated, if expr1 is true.

expr1 , expr2
is the list statement; both expr1 and expr2 are evaluated (together with all side effects, of course!), and the final value of the expression is that of expr2.



Ross Biro
Thu May 25 10:45:54 PDT 1995