comp.unix.shell:
>> echo \223 Open File Transport\223
>> open www.helloworld.nl
>> user Thomas Hallo User Passwort
>> lcd /home/thomas lokaler Verzeichniswechsel
>> cd /ftp/Daten Verzeichniswechsel auf ftp-Verbindung
>> get daten.zip
>> bye
>> open 192.42.1.33 Neue FTP-Verbindung
>> user Anna Huhu User Passwort
>> lcd /home/thomas lokaler Verzeichniswechsel
>> cd ..
>> put daten.zip
>> bye
>> lrm daten.zip Loeschen der Datei daten.zip auf lokalem
>> Verzeichnis/home/thomas
I don't speak German, but this is pretty much a standard thing. I
assume you mean you actually want to run an ftp script in a shell
script. The common mistake is failing to realize that a shell script's
commands are visible to the shell script, not to ftp or the other
commands you start from that script. You want something like
a) a scriptable ftp such as lftp
b) man netrc
c) some ftp:s will actually read stuff from standard input correctly:
ftp <<HERE
open helloworld.nl
user Thomas
pass Hallo
lcd ....
HERE
d) script your normal stupid ftp client with something like expect
You should also read the FAQ, I believe it has a section on this.
Hope this helps,
/* era */
--
.obBotBait: It shouldn't even matter whether <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
* Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *