#numerical comparison $ (( 9 > 10 )) && echo A $ [[ 9 -gt 10 ]] && echo A $ #string comparison $ [[ 9 > 10 ]] && echo A A But environment variable LANG affects LOCALE: $ export LANG=en_US #or en_US.UTF-8, as used by Oracle $ [[ a > A ]] && echo A #even though 'a' has ASCII 97 while 'A' has 65 $ $ export LANG=C #make it behave "normal" $ [[ a > A ]] && echo A A Interestingly, setting LANG to some garbage will have no effect; whatever has (or does not have) effect as of now still has (or does not have) effect. (Test done in 4.1.2(1)-release (x86_64-redhat-linux-gnu), but may be version-independent.)