Okay UNIX gurus, I'm at a loss. I've written a /bin/sh script that places ftp commands into a 'for' loop that appears thusly:
for FILES in `ls directory/`
do
`ftp -n server <<eoj
user name password
lcd localdir
cd remotedir
binary
put $FILES
bye
eoj`
done
The script works just fine, but after each iteration through the loop it generates the error:
./script: Local: command not found
It's irritating the heck out of me and I've tried every incantation and combination of backticks and quoting that I can think of to prevent it. Nothing has worked yet.
Any ideas?
for FILES in `ls directory/`
do
`ftp -n server <<eoj
user name password
lcd localdir
cd remotedir
binary
put $FILES
bye
eoj`
done
The script works just fine, but after each iteration through the loop it generates the error:
./script: Local: command not found
It's irritating the heck out of me and I've tried every incantation and combination of backticks and quoting that I can think of to prevent it. Nothing has worked yet.
Any ideas?