[comp.sys.amiga] FTP Scripts

eretherf@math-cs.kent.edu (Eric Von Retherford) (08/08/90)

I would like to set up a unix csh script file that will run off the cron that
will start up ftp and get a dir listing off the new xanth. Has anyone been
able to do this? Our ftp manual pages seems pretty generic about all of this.

Thanks for any help.

Eric 
.

tadguy@abcfd01.larc.nasa.gov (Tad Guy) (08/09/90)

In article <1990Aug8.131319.21246@math-cs.kent.edu> eretherf@math-cs.kent.edu (Eric Von Retherford) writes:
> I would like to set up a unix csh script file that will run off the cron that
> will start up ftp and get a dir listing off the new xanth. Has anyone been
> able to do this? Our ftp manual pages seems pretty generic about all of this.

Since the content of ``the new xanth*'' is kept in /FILES.Z, it's not
too hard to make a shell script to retrieve it:

--------
#!/bin/sh

host=abcfd20.larc.nasa.gov

ftp -n -i $host <<EOF
user anonymous $USER
binary
get FILES.Z
quit
EOF
--------

The key is to use the -n option, and explicitly give a `user' command.

	...tad


* See message <TADGUY.90Aug8142621@abcfd21.larc.nasa.gov> if you'd
  like to suggest a new name for abcfd20...

jeffo@uiuc.edu (Jeffrey B Nicholson) (09/08/90)

eretherf@math-cs.kent.edu (Eric Von Retherford) writes:

>I would like to set up a unix csh script file that will run off the cron that
>will start up ftp and get a dir listing off the new xanth. Has anyone been
>able to do this? Our ftp manual pages seems pretty generic about all of this.

If you set up a .netrc file in your home directory, ftp will read that and log
you in automatically according to the name and password you give the file.

The format for the file is: (grabbed from our man page on the ftp command)
machine <machine_name>
pass <password>
login <login_name>
macdef <macro_name>
macro line 1
macro line 2
..
macro line n

machine <machine_name2>
{cycle repeats here}


>Thanks for any help.

Sure.

>Eric 

Jeff
jeffo@mrcnext.cso.uiuc.edu