🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #8309

Re: script for ftp get

#8309
From: ARK Systems USA
Date: Thu, 06 Jun 1996 00:00
44 lines
1963 bytes
In article <31B72710.53A4FBEB@fcee.urv.es>,
Alexis Roda  <arv@fcee.urv.es> wrote:
>Christophe Zwecker wrote:
>> 
>> Hi, I want to get a file from my isp by ftp everyday and delete it after. I
>> tried autoexpect, but it hanggs after a download.
>> 
>> Anyone here that is doing this, please tell me how. With this I can get my
>> news package nicely in the night with crond.
>> 
>> thx alot in advance
>> 
>
>Currently I'm doing this with a shell script. You can try something like
>this:
>
># my_ftp_script
>#!/bin/sh
>ftp -i -n <<HELLOWORLD
>open the.ftp.server.you.want
>user your_login_or_anonymous your_password_or_email_addres
>cd where_you_want_on_your_remote_system
>lcd where_you_want_on_your_local_system
>binary
>get one_file
>get another_file
>...
>get the_last_file
>bye
>HELLOWORLD

An expect script would be better. Its grammer is wierd and confusing
(I spent one whole day to find that the space characted in
"exp_output(1, string)" was the calprit for my scrip's misbehavior), but
its pattern patching and timeout functions are very good.

hiro
-- 
ARK Systems USA                   | P.O. Box 23
Inernet: mailto:arkusa@arkusa.com | Santa Clara, CA 95052-0023 USA
Home Page: http://www.arkusa.com  | Phone:+1(408)244-5358 Fax:+1(408)244-5395

Technical Details
Message-ID: <4p795p$8lm@samba.rahul.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <31B6B932.3E3A2AF1@public.uni-hamburg.de> <31B72710.53A4FBEB@fcee.urv.es>

Show Full Headers
Complete Article Headers
Message-ID: <4p795p$8lm@samba.rahul.net>
Subject: Re: script for ftp get
Date: Thu, 06 Jun 1996 00:00:00 +0000
From: ARK Systems USA <arkusa@rahul.net>
References: <31B6B932.3E3A2AF1@public.uni-hamburg.de> <31B72710.53A4FBEB@fcee.urv.es>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 158831114
Distribution: world
Organization: a2i network
Newsgroups: comp.os.linux.networking,news.software.nntp
Nntp-posting-user: arkusa