Thread: Zero padding
View Single Post
Old Feb 17th, 2007, 4:48 PM   #5
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3 Jimbo is on a distinguished road
I don't know if there's a log function in bash, but if you know the length of the longest one you could use printf %0${maxlen}d $yourNum.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote