Hi all
I hav written a very small shell script in bin bash & its not working. The script is ::
#!/bin/bash
i=1.0
while [ $i -le 3.0 ]
do
i=`expr "$i + 0.5" | bc`;
echo "i=$i"
done
The error is :
line 6: [: 1.0: integer expression expected
I think the use of decimals in the while loop is creating problems.
Please help, in urgent need.
Regards
Alice