why am getting error ksh: syntax error: `fi' unexpected while running script
Hi All
I am getting error in one of my script on Sun Solaris box while running in the script thru command line but from cronjob it is working ........... here is the details..........
s024[/home/oracle]$. /home/oracle/scripts/arch_backup.ksh proddb
ksh: syntax error: `fi' unexpected
the part of script where if statement is used...........
chk_err=`cat $LOG_PATH/archbck_$ORACLE_SID.$dt.log | grep "ERROR" | wc -l`
chkerr=${chk_err:-0}
if [ $chkerr -ne 0 ]
then
# mailx -s "$HOST Archbkp $ORACLE_SID Failed" $MAILTO < $LOG_PATH/archbck_$ORACLE_SID.$dt.log
exit 1
else
# mailx -s "$HOST Archbkp $ORACLE_SID Successful" $MAILTO < $LOG_PATH/archbck_$ORACLE_SID.$dt.log
fi
exit 0
---------------------------------
could any pls point out the cause of this error
thanks in advance
|