Use this method:
a=`echo $b*0.123|bc|awk '{printf("%.2f,$1")}`
The following methods will not work:
echo "scale=2;$b*0.123"|bc
Use this method:
a=`echo $b*0.123|bc|awk '{printf("%.2f,$1")}`
The following methods will not work:
echo "scale=2;$b*0.123"|bc