Arithmetic comparison in a shell
i want to compare two number values in a shell script (sh) but it doesn`t work:

    #!/bin/sh
    let a=30
    let b=100
    let x=$a-$b
    echo $a $b $x
    [ $a < $b ] && { echo ok; }

That outputs:

    30 100 -70
    ./x: line 6: 100: No such file or directory


Arithmetic comparison in a shell
===

i want to compare two number values in a shell script (sh) but it doesn`t work:

    #!/bin/sh
    let a=30
    let b=100
    let x=$a-$b
    echo $a $b $x
    [ $a < $b ] && { echo ok; }

That outputs:

    30 100 -70
    ./x: line 6: 100: No such file or directory

