shell脚本四舍五入

printf "%.0f
" $var #四舍五入

eg:
temp3=8
speed1=9
all_cnt_num=$(printf "%.0f
" $((temp3/speed1)))
原文地址:https://www.cnblogs.com/ggzhangxiaochao/p/13845482.html