Below is the simple shell script code for ftp files from Remote server -
while true
do
echo "Coping files from remote server"
sleep 1
ftp -inv $IP <<!
user $USER $PASS
cd /dcs/data01/INPUT/MSC/ERI
lcd /dcs/appl01/testing_scenario
bin
mget ERVNS*
bye
!
sleep 60
done
I am running command on Linux box and getting error -
"syntax error: unexpected end of file"
Please let me know what's wrong with this code. However when I run same command on prompt it is working.
while true
do
echo "Coping files from remote server"
sleep 1
ftp -inv <<!
open $IP
user $USER $PASS
cd /dcs/data01/INPUT/MSC/ERI
lcd /dcs/appl01/testing_scenario
bin
mget ERVNS*
bye
!
sleep 60
done