printf in bash: “09” and “08” are invalid numbers, “07” and “06” are fine
If you have your “09” in a variable, you can do a=”09″ echo “$a” echo “${a#0}” printf “%04d” “${a#0}” Why does this help? Well, a number literal starting with 0 but having no x at the 2nd place is interpreted as octal value. Octal value only have the digits 0..7, 8 and 9 are unknown. … Read more