do floating point calculation in a script and save to a file

k=$(echo “scale = 10; 2 * ((3.14 – $i) / 3.14)” | bc)

 

courtesy:

https://ubuntuforums.org/showthread.php?t=1484604

 

 

Advertisements