All,
ll,
I am trying to ftp multiple files. I borrowed the ftp logic from existing script.
When I enclose the ftp in a for loop, I get a syntax error "'<' unmatched"
I checked all the variables I am using ...
please help...
TIA
Rao
files=$\(ls $\{LI\_REPORT\_FILE_PRE\} \)
for file in $files
do
\# the error point to following line
\# If I execute following 7 lines outside for loop it works
ftp -n -i $\{MF_NAME\} $\{FTP_PORT\} <<EOF >> ./ftp.log
user $MF_LOGIN $MF_PASSWORD
verbose
status
$\{COMMAND\} $\{RS6000_FNAME\} \\'"$\{MF_FNAME\}"\\'
quit
EOF
done
Hi,
Not sure if this is what your looking for, but I've had the situation where I've had to get many files but have been unable to use mget (not supported on remote host).
Rather than looping an ftp each time for each file, I made a script that would build a single script file to do the mutilpe gets.
In this example I had to get files that had a four digit sequence, you change file name generation to what you need.