I have a code:
if [ -d ${COOLDIR}/cool_${Today}/daily ]
then#{ process daily files
for file in *_${Today}*.csv *_${Today}*.txt
do
if [ -f "LET_daily_trans_${Today}.csv" ] || [ -f "LET_daily_trans_345_${Today}.csv" ]
then
echo "This file will be processed in separate script"
continue
fi
if [ "${prefix}" = "MBSE_daily_trans_sum_" ];then
sftp_name=MBSEDTRNSUM
elif [ "${prefix}" = "MBSE_daily_trans_badcpn_" ];then
sftp_name=MBSEDTRNBADCPN
elif [ "${prefix}" = "MBSE_daily_trans_sum_345_" ];then
sftp_name=MBSEDTRNSUM345
elif [ "${prefix}" = "MBSE_daily_trans_badcpn_345_" ];then
sftp_name=MBSEDTRNBADCPN345
elif [ "${prefix}" = "MBSE_daily_trans_" ];then
sftp_name=MBSEDAYTRNS
elif [ "${prefix}" = "MBSE_daily_trans_345_" ];then
sftp_name=MBSEDAYTRNS345
else
echo "Unnkowned prefix name ${prefix}"
fi
if [ "${ext}" != "txt" ];then
do something
fi
done
for file in *.${Today}*.csv *.${Today}*.txt
do
if [ -f daily_tba_position.${Today} ] || [ -f daily_pool_position.${Today} ] || [ -f LET.${Today} ];then
echo "files were processed by the brkvol_day_sftp_ondemand.sh script"
continue
fi
if [ "${ext}" != "txt" ]
then
do something
if [ "${fldt}" = "-" ];then
do something
else
do something
fi
do something
else
do something
fi
if [ "${ext}" != "txt" ];then
do something
else
do something
fi
done
fi #} finished to process daily files line 384
When I try to run the borne shell script I am getting message
./sftp_ondemand.sh[95]: syntax error at line 384 : `fi' unexpected
Could you please let me know why?
Thanks for contribution