On Tue, May 04, 2010 at 08:05:47AM -0500, Peng Yu wrote: > I want $page has three digits. If it is less than 100, prefix it with > 0. Is there an easy way to do so in bash?
printf '%03d\n' $page
On Tue, May 04, 2010 at 08:05:47AM -0500, Peng Yu wrote: > I want $page has three digits. If it is less than 100, prefix it with > 0. Is there an easy way to do so in bash?
printf '%03d\n' $page