Problem
On SCO OpenServer 5.0.5, 5.0.6 systems, the following equality test succeeds when it should not:
#!/bin/kshif [ "x-" = "x" ]thenecho "This if test should not have succeeded"fiThis problem does not occur on SCO OpenServer 5.0.0, 5.0.2, or 5.0.4 systems.
Cause
The problem only occurs if a non-POSIX locale is set. For instance,
if LANG=en_GB.ISO8859-1 or LANG=de_DE.ISO8859-1, the problem will
occur. The problem will not occur if LANG=C_C.C. Solution
Therefore, to work around this, set LANG to C_C.C for the duration of the shell script.