printf 补位 printf "%d\n" 1234 结果得到: 001234 6个字符,不足在左边补0(printf默认右对齐),\n表示换行。 printf "a%031d\n" 33 转载于:https://blog.51cto.com/opsdev/1812387