It is a funny and simply tip under bash.
How to deals with float and division under bash. ‘bc’ is your friend such as :
clucas@jupiter:~$ i=$( echo "scale=3; 1/3" | bc) clucas@jupiter:~$ echo $i .333 clucas@jupiter:~$
It must found on the net (where I found), but searchable for me on this stuff for future.
NdR :
clucas@pluton:~$ i=$((1/3)) clucas@pluton:~$ echo $i 0 clucas@pluton:~$
Float and divide into bash