Specifications
Version 2.0
141
In the second usage, the string1 == string2 condition is true if the two strings are
identical. Here the comparison can be case sensitive or insensitive, it depends on the
optional switch /i. If /i is specified, it will compare strings in the case insensitive
manner; otherwise, it compares strings in the case sensitive manner.
In the third usage, general purpose comparison is supported using expressions
optionally separated by and or or. Since < and > are used for redirection, the
expressions use common two character (FORTRAN) abbreviations for the operators
(augmented with unsigned equivalents):
Expressions
Conditional expressions are evaluated strictly from left to right. Complex conditionals
requiring precedence may be implemented as nested ifs.
The expressions used in the third usage have the following syntax:
conditional-expression := expression |
expression and expression
expression or expression
expression := expr |
not expr
expr := item binop item |
boolfunc(string)
item := mapfunc(string) |
string
mapfunc := efierror | pierror | oemerror
boolfunc := isint | exists | available | profile
binop := gt | lt | eq | ne | ge | le | == | ugt | ult | uge | ule
Comparisons
By default, comparisons are done numerically if the strings on both sides of the
operator are numbers (as defined below) and in case sensitive character sort order
otherwise. Spaces separate the operators from operands.
The /s option forces string comparisons and the /i option forces case-insensitive
string comparisons. If either of these is used, the signed or unsigned versions of the
operators have the same results. The /s and /i apply to the entire line and must










