You could use the arbitrary precision calculator bc if it is installed on the system. It accepts equations like 1.2 < 1.3 and outputs 1 for true or 0 for false. e.g:
bc -q starts bc without a welcome message.
You can echo expressions to bc from a script and receive the output:
Code:
echo "1.2 > 1.3" | bc
gives the result 0. Thus you can include piped input (as above) as part of a script.
(in Perl):
Code:
if(`echo \"1.2 > 1.1\" | bc` == 0){
print "Something here...";
}
Sorry, I don't do much bash scripting, but the principle is the same.