参考: 【bash】 echoとprintfの違い by 01_maiさん
# !/bin/bash
for idx in $(seq 1 3);do
printf "%05d\n" $idx
done
run
Success #stdin #stdout 0s 19632KB
00001
00002
00003
Go to list of users who liked
More than 5 years have passed since last update.
参考: 【bash】 echoとprintfの違い by 01_maiさん
# !/bin/bash
for idx in $(seq 1 3);do
printf "%05d\n" $idx
done
Success #stdin #stdout 0s 19632KB
00001
00002
00003
Register as a new user and use Qiita more conveniently
Go to list of users who liked