Calculate with bc from a shell script

echo -e "5.0000*5" | bc

25.0000

scale can be used to pick the number of decimal places.

Advertisements

~ by nambabwe on 2007/03/08.

 
%d bloggers like this: