不过在除法运算时,如果得到的结果值小于1,得到的小数前面的0不存。 ... #!/bin/bash #方法1 res1=$(printf "%.2f" `echo "scale=2;1/3"|bc`) ...
確定! 回上一頁