I have an if statement that I copied from another script and am getting an error on the 'then' keyword, here is part of the code:
LOGDIR=/u01/home/oracle/trc
SQLDIR=/u01/home/oracle/sysadm
#
echo SKU refresh filewatcher started `date`-----
cd $SQLDIR
sqlplus username/psswd @FILEWATCHER_SKU_REF.sql
cd $LOGDIR
RPT_DATE=`date +\%b_\%d`
LOGFILE=run_script.sh_$RPT_DATE.trc
ERR=`egrep "ORA-02054|ORA-02091|ORA-02292|ORA-02063|ORA-06512|ORA-01033|SP2-0640|SP2-0641" $LOGDIR|wc -l`
if [ $ERR -ne 0 ]
then
echo "TESTING after then"
fi
I am not sure but I keep getting the below error message:
./run_filewatcher_sku_ref.sh: line 35: syntax error at line 45: `then' unmatched
Aucun commentaire:
Enregistrer un commentaire