|
From: | Greg Wooledge |
Subject: | Re: How to control the width of a number? |
Date: | Tue, 4 May 2010 09:15:30 -0400 |
User-agent: | Mutt/1.4.2.3i |
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
[Prev in Thread] | Current Thread | [Next in Thread] |