I have added several lines to my code
let cnt=0
if [ ${sftp_name} = "EOMMSRPT" ]
then
if [ ${cnt} -eq 0 ]
then
cnt=`expr ${cnt} + 1`
sftp_name=EOMMSRPT1
echo "EOMsftpname = ${sftp_name}" >> ${LOGF}
else
sftp_name=EOMMSRPT2
echo "EOMsftpname = ${sftp_name}" >> ${LOGF
fi
fi
Now when I run the script, it has an error
/sftp_ondemand_monthly.sh[76]: syntax error at line 150 : `>' unexpected
What should wrong with it?
Thanks for contribution
---------- Post updated at 01:26 PM ---------- Previous update was at 01:17 PM ----------
Found the problem
echo "EOMsftpname = ${sftp_name}" >> ${LOGF
must be the second
${LOGF}