I'm trying to compare an integer and a floating point in bash script. I have tried the following:
if [ $? -eq 4.189 ];
which doesn't work because it wants 4.189 to be an integer, and
if [ $? = 4.186 ];
because I thought that that might work. I also tried bc. Any tips on how to do this? Bash newbie here. Thanks so much.
Note: $? is the output from an executable that calculates the volume of a sphere.