A number that starts with a zero is interpreted as being in octal. I haven't really looked at your script to tell you how you should be solving this problem, but that's the cause of this error.

Edit: However, if you've got a variable, let's say $i, that's in the form 00, 01, 02, ..., 09, 10, 11, ..., and you want to strip a possible leading zero, then using the expansion ${i#0} would be the best way.


Edited by wfaulk (17/11/2002 15:05)
_________________________
Bitt Faulk