home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
3
/
3185
< prev
next >
Wrap
Text File
|
1991-04-11
|
1KB
|
48 lines
Newsgroups: alt.sources
From: Steve Hayman <sahayman@iuvax.cs.indiana.edu>
Subject: retrieve RFC's automatically from uunet
Message-ID: <1991Apr11.222307.9340@news.cs.indiana.edu>
Date: Thu, 11 Apr 91 17:22:30 -0500
I find this little script handy, it retrieves RFC's automatically
from uunet via anonymous ftp and sticks them on stdout.
So, instead of keeping your own little collection of RFCs
hidden away somewhere and forgetting what directory you
put them in, you can just use
% rfc index | more
% rfc 1217 | lpr (A personal favourite. Get this one. It's funny.)
#!/bin/sh
# 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
PATH=/usr/local/bin:/usr/ucb:/bin:usr/bin export PATH
# 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.Z ;;
*) file=$1.Z ;;
esac
ftp -n ftp.uu.net <<EOF
user anonymous $USER@`hostname`
binary
get rfc/$file "|uncompress -c"
EOF