Ntest returns true if its argument num is non-zero, and false otherwise.
Expr evaluates each arg in turn; if it is an integer it gets pushed onto the stack; otherwise it should name one of the operators below, whereupon the appropriate number of operands are popped off the stack, evaluated as arguments to the operator, and the result pushed back onto the stack. Arguments are passed to the operator first-pushed first, so, for instance, ${expr 2 1 -} yields 1, not -1. Alternative names are given for some operators; this is to avoid the necessity of quoting operators that contain sh(1) metacharacters. All operations use 64-bit signed integers; integers are given in the same form acceptable to Limbo. The relational operators yield either 1 (true) or 0 (false). If the -r option is given, radix specifies an output base for numbers yielded by expr. Numbers are printed in a form suitable for re-interpretation by expr.
When all its arguments have been evaluated, expr yields all the values remaining on its stack, first pushed first. The operators supported by expr are as follows (the number of operands required in is given parentheses):
| SH-EXPR(1) | Rev: Fri Mar 31 10:28:24 GMT 2006 |