[2786] in linux-net channel archive
Re: automated FTP
daemon@ATHENA.MIT.EDU (Tony Nugent)
Sat May 4 10:06:32 1996
Date: Fri, 3 May 1996 15:46:23 +1000
From: Tony Nugent <tonyn@sctnugen.ppp.gu.edu.au>
To: 4bbkt@qlink.queensu.ca, linux-net@vger.rutgers.edu
Boy of "Destiny" <4bbkt@qlink.queensu.ca> wrote:
> I'm trying to tell ftp to send a file from the command line and
> can't get it to work. What I'd like to do is have my dial up script, which
> works fine, update my homepage whenever I logon to my ISP. Any and all help
> is greatly appreciated.
One way would be with a ~/.netrc file something like this:
========8<--cut--\/--\/--\/--\/--\/--\/--\/--\/--\/--\/--\/--
machine qlink.queensu.ca login 4bbkt password It'sAsecret
macdef init
verbose
bin
prompt
lcd ~/www
cd ~/www
mput index.html
bye
========8<--cut--/\--/\--/\--/\--/\--/\--/\--/\--/\--/\--/\--
(The trailing blank line is needed to end the macdef).
The `macdef init' is the secret... it's called as soon as you login.
You could wrap the call to `ftp qlink.queensu.ca' in a shell script
that also writes the ~/.netrc file according to what files you want to
upload.
I'm sure that ncftp can do things like this too, so you might want to
check it out too.
Cheers .
Tony _--_|\
tony@sctnugen.ppp.gu.edu.au / *\ T.Nugent@sct.gu.edu.au
ae.nugent@student.qut.edu.au\_.--._/ tnugent@cit.gu.edu.au
Brisbane, Queensland v Australia
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
The solicitor was reading the late Wilberforce Toeworthy's will,
and had just reached the final paragraph. In a deep voice he intoned:
"I always said I'd remember my dear wife, Gertrude, and mention
her in my will. So - hello there, Gertie!"