Can you please suggest to me the syntax for doing floating point comparison in a Bash script? I would ideally like to use it as part of an if statement. Here is a small code snippet :
key1="12.3"
result="12.2"
if (( $result <= $key1 ))
then
# some code here
fi
bash doesn’t do floats, use awk
there are other shells that can do floats, like zsh or ksh, you might like to try using them as well