Hi,
Following is my code and the file FILE_LIST_EXCESS.txt has 40 file names in it
while read LineIn
do
echo ${LineIn}
`ftp -vin << END_INPUT >> ${PID}_DS_GET_Log.log 2>&1
open servername
user userid password
cd FileDir
get ${LineIn}
END_INPUT`
GET_STATUS=`grep -ic "Transfer complete."${PID}_DS_GET_Log.log`
rm -rf ${PID}_DS_GET_Log.log
if [ ${GET_STATUS} != 0 ]
then
echo ${LineIn} >> FailedFileList.txt
fi
done < FILE_LIST_EXCESS.txt
with the above code it exits after processing first file...
The code works fine with following basic code It reads all 40 files...
while read LineIn
do
echo ${LineIn}
`ftp -vin << END_INPUT >> ${PID}_DS_GET_Log.log 2>&1
open servername
user userid password
cd FileDir
get ${LineIn}
END_INPUT`
echo ${LineIn} "Complete.."
done < FILE_LIST_EXCESS.txt
I have gone mad looking for a solution I would appreciate a solution for this.
Thanks,