I tried to compare floating point number by -gt but it says that point expecting integer value. That means it can not handle floating point number . Then i tried the following code
chi_square=4
if [ "$chi_square>3.84" | bc ]
then
echo yes
else
echo no
fi
But the output is wrong with error . Here is the out put-
line 3: [: missing `]'
File ] is unavailable.
no
Here the no is echoed but it should be yes. I think that's because of the error it's showing. can anybody help me.
bashcannot handle floating point, but Korn shell (ksh) can.