From owner-freebsd-questions Sun Dec 22 16:16:37 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A52EB37B401 for ; Sun, 22 Dec 2002 16:16:36 -0800 (PST) Received: from mail.bellavista.cz (mail.bellavista.cz [62.168.44.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2EA743EDC for ; Sun, 22 Dec 2002 16:16:35 -0800 (PST) (envelope-from neuhauser@bellavista.cz) Received: from freepuppy.bellavista.cz (freepuppy.bellavista.cz [10.0.0.10]) by mail.bellavista.cz (Postfix) with ESMTP id A77C85C; Mon, 23 Dec 2002 02:12:56 +0100 (CET) Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 9FF352FDC56; Mon, 23 Dec 2002 01:16:33 +0100 (CET) Date: Mon, 23 Dec 2002 01:16:33 +0100 From: Roman Neuhauser To: BSD Freak Cc: FreeBSD Questions Subject: Re: Padding expr output Message-ID: <20021223001633.GB42622@freepuppy.bellavista.cz> Mail-Followup-To: BSD Freak , FreeBSD Questions References: <108151f107bf32.107bf32108151f@mbox.com.au> <20021223001222.GA42622@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021223001222.GA42622@freepuppy.bellavista.cz> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # 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