home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3517 < prev    next >
Internet Message Format  |  1991-06-19  |  2KB

  1. From: Dan_Jacobson@ATT.COM
  2. Newsgroups: alt.sources,comp.unix.admin
  3. Subject: Re: How do I get RFC articles?
  4. Message-ID: <1991Jun19.005837.21993@cbfsb.att.com>
  5. Date: 19 Jun 91 00:58:37 GMT
  6.     <1991Jun18.010117.22207@leland.Stanford.EDU>
  7. Sender: news@cbfsb.att.com
  8. Reply-To: Dan_Jacobson@ihlpz.ATT.COM
  9. Followup-To: alt.sources.d,comp.unix.admin
  10. Organization: AT&T-BL, Naperville IL, USA
  11. Lines: 50
  12. In-Reply-To: alderson@Alderson.Stanford.EDU's message of 18 Jun 91 01: 01:17 GMT
  13. Originator: danj1@cbnewsf.cb.att.com
  14.  
  15. here's a handy script:
  16.  
  17. ftp=ftp #it might be called someting funny on your system -DJ
  18. #From: sahayman@iuvax.cs.indiana.edu (Steve Hayman)
  19. #Newsgroups: alt.sources
  20. #Subject: retrieve RFC's automatically from uunet
  21. #Date: 11 Apr 91 22:22:30 GMT
  22. #Organization: Computer Science, Indiana University
  23. #
  24. #I find this little script handy, it retrieves RFC's automatically
  25. #from uunet via anonymous ftp and sticks them on stdout.
  26. #So, instead of keeping your own little collection of RFCs
  27. #hidden away somewhere and forgetting what directory you
  28. #put them in, you can just use
  29. #
  30. #% rfc index | more
  31. #% rfc 1217 | lpr    (A personal favourite. Get this one. It's funny.)
  32.  
  33. #!/bin/sh
  34. # rfc NNN
  35. # retrieve rfc NNN from uunet, put it on stdout
  36. # assumes rfc's are in uunet:/rfc/rfcNNNN.Z
  37. #
  38. # Actually the uunet people would prefer it if you ftp'd things
  39. # from 'ftp.uu.net', so we retrieve things from that machine.
  40. #
  41. # uunet conveniently has files called "index" and "rfc-index"
  42. # in the /rfc directory, so this script will also let you
  43. # retrieve those.
  44. #
  45. # sahayman
  46. # 1991 04 10
  47.  
  48.  
  49. PATH=/usr/local/bin:/usr/ucb:/bin:usr/bin export PATH
  50.  
  51. # a little hack so that we can say "rfc index" or "rfc rfc-index"
  52. # as well as "rfc 822"
  53.  
  54. case "$1" in
  55. "")        echo "$0: Usage $0 [NNN] [index] [rfc-index]" 1>&2; exit 1 ;;
  56. [0123456789]*)    file=rfc$1.Z ;;
  57. *)        file=$1.Z ;;
  58. esac
  59.  
  60. ${ftp?} -n ftp.uu.net <<EOF
  61. user anonymous $USER@`hostname`
  62. binary
  63. get rfc/$file "|uncompress -c"
  64. EOF
  65.