bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to control the width of a number?


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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]