home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!decwrl!deccrl!news.crl.dec.com!pa.dec.com!decuac!hussar.dco.dec.com!mjr
- From: mjr@hussar.dco.dec.com (Marcus J. Ranum)
- Subject: Re: FTP batch style ?
- Message-ID: <1992Sep3.193748.27591@decuac.dec.com>
- Sender: news@decuac.dec.com (USENET News System)
- Nntp-Posting-Host: hussar.dco.dec.com
- Organization: Digital Equipment Corporation, Washington ULTRIX Resource Center
- References: <1992Sep3.120725.1@vax.sonoma.edu>
- Date: Thu, 3 Sep 1992 19:37:48 GMT
- Lines: 25
-
- > I'm trying to come up with a script file which FTP's an empty file
- >to another host (local) which is non-UNIX/ULTRIX.......I'd like to see
- >examples of how this is done.....the man pages are somewhat vague about
- >how the .netrc is invoked and I would like the script to be cronable
-
- Let's suppose I want to copy a file from my local server, 'urc'
-
- Well, first you put something like this in your .netrc:
-
- machine urc login anonymous password mjr@dco.dec.com
-
- Then you write a shell script like:
-
- #!/bin/sh
- ftp urc << _EOF_
- cd pub
- prompt
- mget *.Z
- quit
- _EOF_
-
- Then execute the shell script from cron. Doing stuff like trapping
- errors and logging it is left as an exercise for the reader.
-
- mjr.
-