View Single Post

   
  #10 (permalink)  
Old 01-05-2008, 11:10 AM
Paul Landay
 
Posts: n/a
Default Re: Newbie Scripting Variable Question

dawaves wrote:
> How about this one....
> How do I make a variable that I have, let's say it's, "1", into "01".
> Or "8" into "08"?


Be careful. The shell may interpret "0x" as an octal number,
not left-zero-padded-decimal. If it does you will find that
"08" is an non-numeric value altogether (not valid octal).

If you only use the "0x" value as a string, then you should
be fine, but in octal 07+01=10.

http://groups.google.com/group/comp....d82a377e66167d

Paul Landay
Reply With Quote