ftp script in expect

Ron Peterson ron.peterson at yellowbank.com
Thu Sep 20 10:41:30 EDT 2001


On Thu, 20 Sep 2001, mike ledoux wrote:

> On Thu, 20 Sep 2001, Ron Peterson wrote:
>
> >> >What with the constant barrage of new and improved virii, I thought I'd
> >> >make it easier to help my Windows friends.  So I wrote this little expect
> >> >script.  Problem is, it stops downloading and quits after one file.
> >> >
> >> >(?)
> >> >
> >> >spawn ftp ftp.nai.com
> >> >expect "Name*:"
> >> >send "anonymous\r"
> >> >expect "Password:"
> >> >send "devnull at pagoda.mtholyoke.edu\r"
> >> >expect "ftp>"
> >> >send "cd pub/antivirus/datfiles/4.x\r"
> >> >expect "ftp>"
> >> >send "bin\r"
> >> >expect "ftp>"
> >> >send "prompt\r"
> >> >expect "ftp>"
> >> >send "mget *\r"
> >> >expect "ftp>"
> >> >send "quit"
> >>
> >> This looks like a job for 'wget'.  Something like:
> >>
> >> 	wget -r -b -c ftp://ftp.nai.com/pub/antivirus/datfiles/4.x/
> >>
> >> should do the trick.
> >
> >Yeah.  I tried wget - actually tried that first.  It won't retrieve
> >anything.
>
> Strange, I just tried the above command (well, without the -b), and
> retrieved several .upd files before I killed the transfer...

Hmm.  Did exactly that, but it just quit on me.  Maybe I'm getting
timeouts.  I'm going to schedule some of these things to run at three in
the morning and see how I fare..

-- 

-Ron-
https://www.yellowbank.com/

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list