Xref: utzoo alt.sources.d:1879 comp.unix.admin:2259 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!cernvax!chx400!sicsun!disuns2!disuns2.epfl.ch!simon From: simon@liasun2.epfl.ch (Simon Leinen) Newsgroups: alt.sources.d,comp.unix.admin Subject: Re: How do I get RFC articles? Message-ID: Date: 19 Jun 91 09:13:23 GMT References: <1991Jun17.134449.18197@mlb.semi.harris.com> <1991Jun18.010117.22207@leland.Stanford.EDU> <1991Jun19.005837.21993@cbfsb.att.com> Sender: news@disuns2.epfl.ch Reply-To: simon@liasun6.epfl.ch Followup-To: alt.sources.d,comp.unix.admin Organization: /users/simon/.organization Lines: 71 Nntp-Posting-Host: liasun1.epfl.ch In-reply-to: Dan_Jacobson@ATT.COM's message of 19 Jun 91 00:58:37 GMT X-Md4-Signature: 1c55adbbebb86b61b5934cf0a3f64e15 If you mind the traffic, or want to build an RFC collection incrementally, you may want to use my caching version of the recently posted program. You have to modify the RFCDIR variable to a suitable cache directory (should be world-writable with the sticky bit set if your system provides this feature). -- Simon. #!/bin/sh ############################################################################## # File Name: rfc # Description: retrieve RFC's automatically from uunet # Author: Steve Hayman (sahayman@iuvax.cs.indiana.edu) # Date Created: 11-Apr-91 ############################################################################## # rfc NNN # retrieve rfc NNN from uunet, put it on stdout # assumes rfc's are in uunet:/rfc/rfcNNNN.Z # # Actually the uunet people would prefer it if you ftp'd things # from 'ftp.uu.net', so we retrieve things from that machine. # # uunet conveniently has files called "index" and "rfc-index" # in the /rfc directory, so this script will also let you # retrieve those. # # sahayman # 1991 04 10 ############################################################################## # I made the following modification: The RFC is first searched in the # ${RFCDIR} directory in either compressed or uncompressed form. If # it is not found there, the compressed version is first retrieved # from ${FTPSERVER} (defaults to ftp.uu.net) and stored in the cache # directory. You should have write access to the cache directory. # # Simon Leinen (simon@liasun6.epfl.ch). ############################################################################## export PATH ftp=ftp #(mine was called "pftp" --DJ) PATH=/usr/local/bin:/usr/ucb:/bin:usr/bin RFCDIR=/public/doc/rfc TMPDIR=/tmp RFCSERVER=ftp.uu.net # a little hack so that we can say "rfc index" or "rfc rfc-index" # as well as "rfc 822" case "$1" in "") echo "$0: Usage $0 [NNN] [index] [rfc-index]" 1>&2; exit 1 ;; [0123456789]*) file=rfc$1 ;; *) file=$1 ;; esac if [ -r $RFCDIR/$file ] then cat $RFCDIR/$file else if [ ! -r $RFCDIR/$file.Z ] then ${ftp?} -n $RFCSERVER <