Padding expr output

2002-12-22 Thread BSD Freak
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

Re: Padding expr output

2002-12-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 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) zero-padded integer and

Re: Padding expr output

2002-12-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-12-23 01:12:22 +0100: # [EMAIL PROTECTED] / 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

Re: Padding expr output

2002-12-22 Thread Kurt Bigler
on 12/22/02 3:57 PM, BSD Freak [EMAIL PROTECTED] wrote: 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

Re: Padding expr output

2002-12-22 Thread Mike Jeays
Kurt Bigler wrote: on 12/22/02 3:57 PM, BSD Freak [EMAIL PROTECTED] wrote: 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