if [ 3 -lt 6 ]; then
echo "It works with ints"
fi
if [ 3.0 -lt 6.0 ]; then
echo "It works with floats"
else
echo "It doesn't work with floats"
fi
Comparing the integers in an "if" works just fine.
But it doesn't work when I do the same thing with floating point numbers, and gives me this output:
+ [ 3.0 -lt 6.0 ]
/tmp/hudson7259224562322746826.sh: 11: [: Illegal number: 3.0
+ echo It doesn't work with floats
It doesn't work with floats