home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume08 / rntomh.cl < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  1.4 KB

  1. From decwrl!ucbvax!tut.cis.ohio-state.edu!husc6!ginosko!uunet!allbery Sun Aug 27 14:48:45 PDT 1989
  2. Article 1060 of comp.sources.misc:
  3. Path: decwrl!ucbvax!tut.cis.ohio-state.edu!husc6!ginosko!uunet!allbery
  4. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5. Newsgroups: comp.sources.misc
  6. Subject: v08i020: another rn-to-MH saver
  7. Message-ID: <65377@uunet.UU.NET>
  8. Date: 27 Aug 89 15:53:18 GMT
  9. Sender: allbery@uunet.UU.NET
  10. Reply-To: leres@helios.ee.lbl.gov (Craig Leres)
  11. Lines: 34
  12. Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  13.  
  14. Posting-number: Volume 8, Issue 20
  15. Submitted-by: leres@helios.ee.lbl.gov (Craig Leres)
  16. Archive-name: rntomh_cl
  17.  
  18. Well, I use a script that does the same thing. And I agree that
  19. rcvstore is the right way to do it. For your amusement, I've appended
  20. my script.
  21. ------
  22. #! /bin/sh
  23. # This file was wrapped with "dummyshar".  "sh" this file to extract.
  24. # Contents:  rn2mh2
  25. echo extracting 'rn2mh2'
  26. if test -f 'rn2mh2' -a -z "$1"; then echo Not overwriting 'rn2mh2'; else
  27. sed 's/^X//' << \EOF > 'rn2mh2'
  28. X#!/bin/csh -f
  29. X#
  30. X# rntomh
  31. X#
  32. X# Arguments:
  33. X#   %C  newsgroup name, dot form
  34. X#   %a  article number
  35. X#
  36. X# Stdin:
  37. X#   the article to save
  38. X
  39. Xset folder=+news
  40. X( echo "Article: $2 of $1" ; cat ) | /usr/new/lib/mh/rcvstore $folder
  41. X
  42. Xecho Saved article $2 of $1 to $folder.
  43. EOF
  44. chars=`wc -c < 'rn2mh2'`
  45. if test $chars !=      260; then echo 'rn2mh2' is $chars characters, should be      260 characters!; fi
  46. fi
  47. exit 0
  48.  
  49.  
  50.