Basically I need to convert centimetres to inches which I am trying to do by diving the area in centimetres by 2.54.
But I just cannot get this to work.
echo "please enter width and then height"
read width
read height
area=$(($width * $height))
inchesarea=$((area / 2.54))
echo $area
echo $inchesarea
Should I be using bc
for this?
bc
or pick something else from How to do integer & float calculations, in bash or other languages/frameworks?. – manatwork Mar 30 '14 at 18:03