Date: Mon, 23 Dec 2002 01:16:33 +0100 From: Roman Neuhauser <neuhauser@bellavista.cz> To: BSD Freak <bsd-freak@mbox.com.au> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: Padding expr output Message-ID: <20021223001633.GB42622@freepuppy.bellavista.cz> In-Reply-To: <20021223001222.GA42622@freepuppy.bellavista.cz> References: <108151f107bf32.107bf32108151f@mbox.com.au> <20021223001222.GA42622@freepuppy.bellavista.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
# neuhauser@bellavista.cz / 2002-12-23 01:12:22 +0100: > # bsd-freak@mbox.com.au / 2002-12-23 10:57:19 +1100: > > 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 > > printf(8) printf(1), of course. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html 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?20021223001633.GB42622>