read file and ftp automation script

Red hat Enterprise linux es version 3 (f...
April 16, 2010 at 07:48:05
Specs: Linux
What's wrong with this script? I'm trying to read in a text file that lists filenames I want to get from FTP. For each filename listed in the text file, I want to get the file. I'm getting "unexpected token near 'done'" error.

while read LINEVAR
ftp -n $server
user $username $passwd
get ${LINEVAR}.tar.gz
done < loadfilelist.txt

Thank you. I'm I newbie-I appreciate your help.

See More: read file and ftp automation script

April 16, 2010 at 11:58:11
I haven't used ftp in many years, but I think the commands to ftp must be embedded into a unix/linux here document.

Check out the last post of this thread:

Report •
Related Solutions

Ask Question