🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by Christophe Zwecker Thu, 06 Jun 1996 00:00
script for ftp get
#8336
Author: Christophe Zwecker
Date: Thu, 06 Jun 1996 00:00
22 lines
1317 bytes
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

cu
-- 

   Christophe

--------------------------------------------------------------------------
Christophe Zwecker                    email: fw5y491@public.uni-hamburg.de
Hamburg, Germany                      
--------------------------------------------------------------------------

In newsgroups please reply also by email - thanks

Re: script for ftp get
#8309
Author: 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

Re: script for ftp get
#8323
Author: Alexis Roda
Date: Thu, 06 Jun 1996 00:00
39 lines
1580 bytes
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

it works fine for me with cron.


Saludos, Alex (:
e-mail: arv@fcee.urv.es
Universitat Rovira i Virgili
Tarragona (Spain)

Re: script for ftp get
#8368
Author: Roscinante
Date: Fri, 07 Jun 1996 00:00
23 lines
1067 bytes
Christophe Zwecker <fw5y491@public.uni-hamburg.de> writes:

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

ftp < script

# script
open my.host.com
bin
prompt
cd /my/dir
get myfile
dele myfile
quit
# :)



Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads