Hi anybody
kindly help me to overcome this error,
in my following UNIX script the value of substr is the Hour position in processing records, and I want to seperate only 00 to 09 records to a seperate file, when I run this script when it reaches to 08 hour containg record it gives me 08: value too great for base (error token is '08') msg and loop goes out.
Highly appreciate if you solve this problem
tks
# ***************************************************
cat EventLogFile.txt |while read line
do
HOUR=`echo $line | awk '{printf("%s\n",substr($line,21,2))}'
hr=$HOUR
I faced the same issue yesterday. Perderabo pointed me to thread
This issue is caused by numbers starting with 0 being treated as octal numbers. 08 and 09 are invalid octal numbers, thus the message comes up. You can change the base to 10 by using 10# in front of the number.