Dear Team,
I am new to unix and have written some script which is not formatted because i want a free download tool to format the below code by window xp OS to save time
Problem is that if i execute the script manually it works but when i ccron it it dont work with expected results. My cron is working because i get mail.
---------------------
crontab -l
* * * * * /bdrhomtt01/projets/BDR/bdrhom02/bin/mah_trf.ksh
---------------------
Script:
more mah_trf.ksh
Code:
cd /bdrhomtt01/projets/BDR/bdrhom02/log
for i in `ls /bdrhomtt01/projets/BDR/bdrhom02/log/test* | xargs -n1 basename`;
do
if [[ $i != "test1.txt" ]]
then
echo $i;
ftp -niv PARNAS04 << EOF
user TRANSBDR xxxxxx
cd BDRDoc/Extractions_Output_Files
put $i
bye
EOF
mv $i /bdrhomtt01/projets/BDR/bdrhom02/RC/
else
echo "No new files found to tarnsfer";
fi
done
cd /bdrhomtt01/projets/BDR/bdrhom02/bin/
cat m.txt | mailx -s "Files moved to PARNA04"
mahendra.singh@gmail.com