[comp.unix.questions] Simtel Shell

cs3sd3ai@maccs.dcss.mcmaster.ca (Tigger) (10/06/89)

I'm having some porblems writing a script to auto download files from
the Simtel archives.  What I would like to do is create a file
containing a list of the files i want, submit this as a batch file,
and relax.  This is what I have come up with so far :

csh> ftp -n < shellfile

where shellfile contains :

open 26.2.0.74		(open the simtel ftp)
user anonymous			(login as anonymous)
pass blah
cd pd1:<msdos.xxx>
get foo
get bar
quit
EOF

The problem is that when you send the user command to simtel, it responds
with Passord : without reading the next line in the file (giving the Pass
command).  I therefore have to type at the terminal during the script.
This, therefore, means that I can't submit this as a batch operation.

What am I doing wrong?  How can I tell simtel the password on the 
user anonymous line?

BTW, were running a sun with BSD 4.3

Thanx for you help!

John Clarke 
McMaster U.
Hamilton, ON
Canada
cs3sd3ai@maccs.dcss.mcmaster.ca

cspencer@spdcc.COM (Cliff Spencer) (10/06/89)

In article <252B9C44.3966@maccs.dcss.mcmaster.ca> cs3sd3ai@maccs.dcss.mcmaster.ca (Tigger) writes:
>The problem is that when you send the user command to simtel, it responds
>with Passord : without reading the next line in the file (giving the Pass
>command).  I therefore have to type at the terminal during the script.
>This, therefore, means that I can't submit this as a batch operation.
It's the ftp program that its prompting for Password: try sending

	user anonymous anything

						-cliff

pvo3366@sapphire.OCE.ORST.EDU (Paul O'Neill) (10/07/89)

In article <252B9C44.3966@maccs.dcss.mcmaster.ca> cs3sd3ai@maccs.dcss.mcmaster.ca (Tigger) writes:
>I'm having some porblems writing a script to auto download files from
>the Simtel archives.  
>
>What am I doing wrong? 


The problem is that your not using bftp or bftptool (batch ftp).
Don't reinvent what Annette Deschon has already done a beautiful job on.

Available from venera.isi.edu via ftp.

		~ftp/pub/BFTP.210.tar.Z



Paul O'Neill                 pvo@oce.orst.edu
Coastal Imaging Lab
OSU--Oceanography
Corvallis, OR  97331         503-754-3251

kamat@uceng.UC.EDU (Govind N. Kamat) (10/08/89)

In article <252B9C44.3966@maccs.dcss.mcmaster.ca> cs3sd3ai@maccs.dcss.mcmaster.ca (Tigger) writes:

   The problem is that when you send the user command to simtel, it responds
   with Passord : without reading the next line in the file (giving the Pass
   command).  I therefore have to type at the terminal during the script.
   This, therefore, means that I can't submit this as a batch operation.

Some versions of ftp recognize the .netrc file in which you can include
the ftp login and password.  

--
Govind N. Kamat 			College of Engineering
kamat@uceng.UC.EDU			University of Cincinnati
					Cincinnati, OH 45221, USA