01-23-04 10:11 PM
Pete Rau wrote:quote:
> Is there a way to invoke FTP and pass parms to ftp through a file.
> Something like FTP <input.
>
>
Alternatively, check `man ftp` to see that you have a version that
supports .netrc. If so, you can create $HOME/.netrc with a macdef init
entry that runs all your commands, like so:
--------------------------------------------------------------
machine sunsite.unc.edu login ftp password myname@ macdef init
cd pub/linux
bin
hash
get 00-find.Linux.gz
quit
--------------------------------------------------------------
Then, chmod 600 $HOME/.netrc
Don't forget the empty line which ends the init macro.
Then, just run `ftp sunsite.unc.edu` and watch the magic happen.
--
Danny C.
[ Post a follow-up to this message ]
|