Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 2002 10:57:19 +1100
From:      BSD Freak <bsd-freak@mbox.com.au>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Padding expr output
Message-ID:  <108151f107bf32.107bf32108151f@mbox.com.au>

next in thread | raw e-mail | index | archive | help
Hi all,

I am usiung expr in a shell script and need to pad it's output to 
always be 3 characters. An example will explain thing better:

% expr 007 + 1
Output is 8

I need the output to be 008


I checked the expr man page, but nothing there solves my problem. 
Anyone out there got one?

Thanks in advance....



---------------------------------------------------------------------
Would you like to receive faxes to your personal email address?
You can with mBox.  Visit http://www.mbox.com.au/fax

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?108151f107bf32.107bf32108151f>