On Jan 10, 2008 3:13 PM, Frans de Boer <[EMAIL PROTECTED]> wrote:
> To: bug-bash@gnu.org
> Subject: Comparison failure
>
> Following is a function which fails constantly. The function is being
> called by other functions but the result is nowadays always this failure
> on the compare function. Sometimes it went wrong when the number was
> three (2) in this example it is 6. This has worked before with another
> version of bash.
> ++ [[ 5 < 54 ]]
>

< = != > inside [[   ]] compares strings not numbers ie [[ 2 < 103 ]] is false

use either [[ 2 -lt 103 ]] or the arithmetic evaluation : (( 2 < 103 ))


Reply via email to