Problem
The ksh greater-than string comparison:[[ string1 > string2 ]]doesn't work as documented, returning an error ("#" indicates the command line prompt):
# ksh -c "[[ bbb > aaa ]] && echo true"
ksh: bbb: bad number
# Solution
This problem has been reported to SCO Engineering and is scheduled to be addressed in a future release of SCO OpenServer 5.
A simple workaround is to reverse the order of the string arguments, and use the corresponding less-than string comparison:
[[ string2 < string1 ]] See also
manual page ksh(C)