A process will be writing to a set of directories, one for each hour using date +%H notation, so 00, 01, 02... 22, 23. I'm wanting to keep the leading 0 on single digit hours to keep sorted listings tidy.
I=00; until [ $I -gt 23 ]; do mkdir $I; let I=I+1; done
Has predictable effects of not keeping a leading 0 before the single digits. I could just go and make them by hand, but feel there should be a way to do this. Any ideas?