floating point with Shell script

Soo-Hyun Choi soohyunc at users.sourceforge.net
Sun Feb 12 19:03:44 UTC 2006


Hi,

This may be a little bit off-topic.

I would like to do some floating point arithmetic with shell script
programming as the below.

if [ floating_number_01 = floating_number_02]; then
   do-some-work
else
   do-some-other-work
fi


I know shell script cannot deal the floating point directly. Then, how
do I deal with the above flow control statement?

Thanks,




More information about the ubuntu-users mailing list