Friday, February 12, 2016

arithmetic calculation by Linux ; change the number of digits of linux bc -l output

echo 'scale=2; (2.777 - 1.4744)/1' | bc 
1.30


reference: http://stackoverflow.com/questions/13963265/bc-is-ignoring-scale-option

No comments:

Post a Comment