Okay, ran into a bit of a snag. The script worked great until the other day. Then I started getting the following error:
Code:
line 53: 2010-01-08: value too great for base (error token is "08")
Line 53 is part of the following:
Code:
50 # The for(1) loop will read the $file and sort it according to column 1, the date in your supplied example.
51 for i in $MYFILE; do
52 # This adds the second column to an array named "array1"
53 array1[$i]=$(echo $i | cut -d',' -f2)
54 # This adds the third column to an array named "array2"
55 array2[$i]=$(echo $i | cut -d',' -f3)
56 # Increment the elemental counter :)
57 ((i++))
58 done
59 IFS=$old_IFS
I get the feeling that it is because the 08 in the date is being interpreted as an octal. I can't change the way the date is being stored, as it is an enterprise application I don't control the configuration of. Is there a way I can get the script to interpret the number as base-10 instead?
A