in reply to Formating question

Do you really have to use format? I would rather use a simple printf instead:
printf "%d %02d\n", 1, 2;
This prints out
1 02

Where %02d denotes a 2 digit number with leading zero.