shell 输出数字左侧补0凑位数

来源:互联网 发布:三维立体图软件 编辑:程序博客网 时间:2024/05/21 19:49
 
printf "%02d\n" 8
结果08
 
 
printf "%03d\n" 8
结果008
 
 
0 0