shell脚本四舍五入

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

eg:
temp3=8
speed1=9
all_cnt_num=$(printf "%.0f\n" $((temp3/speed1)))

 

posted on 2020-10-20 11:22  裸睡的猪  阅读(2630)  评论(0编辑  收藏  举报