FTP in Shell Script
Gene E. Dascher
gedascher at multiservice.com
Tue Jul 25 16:32:44 CDT 2000
> Any suggestions would be greatly appreciated.
Have the script write to a file called .netrc in the home directory of the
user that is going to be running this. Have the following information at
the top of the file:
machine <remote machine name>
login <remote user login>
password <remote user pwd>
macdef init
prompt
The macdef init tells ftp that you are going to be using a macro. Prompt
turns the interactive mode off.
After 'prompt', you list your ftp commands, (ie: put file1 file1)and when
you are all done, put the following lines at the end of the file:
close
bye
That is how it is done in Unix. Do a 'man netrc' and see what that says. I
have never had to use this in Linux, though.
Gene
More information about the Kclug
mailing list