I need to FTP multiple files with the filenames contained in a list. I need to make one connection, so looping through the list and ftp'ing each file is not an option. I tried something like this, but cat doesn't read the contents like I need.
#!/bin/ksh
list=`cat list.txt`
if [ -s list.txt ]; then
ftp -ndi ${IP} <<-! > ftp.log 2>/dev/null
user ${user} ${pwd}
bin
cd ${rdir}
mput ${list}
bye
!
fi
Thanks in advance...
#!/bin/ksh
list=`cat list.txt`
if [ -s list.txt ]; then
ftp -ndi ${IP} <<-! > ftp.log 2>/dev/null
user ${user} ${pwd}
bin
cd ${rdir}
mput ${list}
bye
!
fi
Thanks in advance...