From decwrl!ucbvax!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!wugate!uunet!allbery Fri Aug 25 22:46:52 PDT 1989 Article 1051 of comp.sources.misc: Path: decwrl!ucbvax!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!wugate!uunet!allbery From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) Newsgroups: comp.sources.misc Subject: v08i012: rntomh: comp.sources.unix article Message-ID: <64819@uunet.UU.NET> Date: 23 Aug 89 23:51:26 GMT Sender: allbery@uunet.UU.NET Reply-To: jamesp@amadeus.wr.tek.com ("James T. Perkins") Lines: 73 Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) Posting-number: Volume 8, Issue 12 Submitted-by: jamesp@amadeus.wr.tek.com ("James T. Perkins") Archive-name: rntomh [??? I use "s |/usr/llib/mh/rcvstore +" myself -- if I wanted to, I could force the newsgroup, but I prefer manual handling so I can group sources by archive-name, etc. ++bsa] Have you ever had the desire to save your rn articles as MH-style messages in an MH mail folder? I found an answer on one of the source newsgroups some time back, and the following is a much faster implementation, which also does not have the nasty side effect of changing your current MH folder. When running rn, to save the current article into the mail folder, just type "s" to save the message. Add this line to your .rnmac file: "s s|rntomh %C %a^J" Do not include the double quotes. Yes, that's a TAB character after the intial "s", and yes, that is a literal "^" followed by a literal "J" at the end. Add the following script into your local bin directory. Make sure you make it executable and readable, and rehash if you are running csh or one of it's hoary relatives. Enjoy! -------------------------------- cut here ------------------------------------- #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'rn2mh' <<'END_OF_FILE' X: ----- start of script "rntomh" ----- X# X# rntomh X# X# Arguments: X# %C newsgroup name, dot form X# %a article number X# X# Stdin: X# the article to save X Xfolder=+news Xnew="`mhpath new $folder`" X( echo "Article: $2 of $1" ; cat ) > $new X Xecho Saved article $2 of $1 to $folder. END_OF_FILE if test 280 -ne `wc -c <'rn2mh'`; then echo shar: \"'rn2mh'\" unpacked with wrong size! fi # end of 'rn2mh' fi echo shar: End of shell archive. exit 0 -- ___ ___ ___ | \ / _ \ / __| James T. Perkins, jamesp@dadla.la.tek.com, (503)629-1149 | |> || |_| |\__ \ Tektronix, Dig Sys Div, DAS 9200 Software Integration |___/ |_| |_||___/ MS 92-725, PO Box 4600, Beaverton, OR 97075