Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ftp script in expect



Scott Lanning wrote:

>On Wed, 19 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"
>>
>
>Whenever I do mget, it prompts for each file, like:
>
>ftp> mget *.txt
>mget foo.txt?
>
>and then you have to hit Enter each time.
>
>-
>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).
>
Have you tried typing 'prompt' first to disable the interactive prompt?


-
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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org