On 7/23/14, 3:20 AM, maik.lied...@sungard.com wrote: > hello, > > to change our scripts from ksh to bash we have problems with vars and leading > zeros. > how we can declare hrs and min?
Greg offered several good suggestions to force base 10 in certain situations. > or can we disable the automatic change from decimal to octal? No. Bash treats integer constants identically regardless of the context: a leading 0 denotes octal. ksh93 treats constants with leading zeros differently in different contexts (assigning to a variable with the integer attribute set happens to be one of the cases where ksh93 treats a constant as strictly decimal). Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/