The follwoing code:
#Check if any files are in the error DB
lines=`hcidbdump -e | wc -l`;
echo $lines;
today=`date +%Y%m%d`;
echo $today;
if (( $lines != 8 ))
then
`hcidbdump -e -L >> $today.txt`;
fi
gives me the follwoing error:
db_check.ksh[13]: ^M: not found
db_check.ksh[15]: ^M: not found
db_check.ksh[21]: ^M: not found
db_check.ksh[23]: ^M: not found
db_check.ksh[24]: ^M: not found
10
db_check.ksh[25]: ^M: not found
db_check.ksh[26]: ^M: not found
20040908
db_check.ksh[27]: ^M: not found
db_check.ksh[28]: ^M: not found
db_check.ksh[28]: syntax error at line 29 : `if' unmatched
I am not sure where my syntax error is. I have tried several ways of doing this and I can't seem to make it work. TIA for any pointers.
Ati2ude
#Check if any files are in the error DB
lines=`hcidbdump -e | wc -l`;
echo $lines;
today=`date +%Y%m%d`;
echo $today;
if (( $lines != 8 ))
then
`hcidbdump -e -L >> $today.txt`;
fi
gives me the follwoing error:
db_check.ksh[13]: ^M: not found
db_check.ksh[15]: ^M: not found
db_check.ksh[21]: ^M: not found
db_check.ksh[23]: ^M: not found
db_check.ksh[24]: ^M: not found
10
db_check.ksh[25]: ^M: not found
db_check.ksh[26]: ^M: not found
20040908
db_check.ksh[27]: ^M: not found
db_check.ksh[28]: ^M: not found
db_check.ksh[28]: syntax error at line 29 : `if' unmatched
I am not sure where my syntax error is. I have tried several ways of doing this and I can't seem to make it work. TIA for any pointers.
Ati2ude