I need to loop some values,
for i in $(seq $first $last)
do
does something here
done
For $first
and $last
, i need it to be of fixed length 5. So if the input is 1
, i need to add zeros in front such that it becomes 00001
. It loops till 99999
for example, but the length has to be 5.
E.g.: 00002
, 00042
, 00212
, 012312
and so forth.
Any idea on how i can do that?
Question&Answers:os