Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!rpi!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: news.newusers.questions Subject: Re: rot13 Message-ID: <1989Oct6.054023.4351@rpi.edu> Date: 6 Oct 89 05:40:23 GMT References: <877@cbnewsi.ATT.COM> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 41 In <877@cbnewsi.ATT.COM> melnik@cbnewsi.ATT.COM (joann.melnik) writes: Joanne> How do I save (decrypted) an article encrypted in rot13?? Joanne> I use rn, and when I save the article (even though the display is Joanne> decrypted) it's in rot13 in the saved file? This topic is loosely addressed in "Answers to Frequently Asked Questions (Updated: 3 Sep 1989)", one of the regular postings to news.announce.newusers. It has this to say: 6. How do I decrypt jokes in rec.humor? [...] If your system doesn't have a program to encrypt and decrypt these, you can quickly create a shell script using "tr": tr A-Za-z N-ZA-Mn-za-m On some versions of Unix, the "tr" command should be written as: tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" Now, knowing what command can decrypt the message for you, you can use the normal features of rn to facilitate this. For example, you could type "| tr A-Za-z N-ZA-Mn-za-m > filename". You probably don't want to have to remember and type that everytime you want to save a rot13 article though, so you could define a macro to do that. Just to save a little effort (this is documented in the rn manual page; refer to it for further information), a suitable macro for .rnmac could be: @x %(%m=[ap]?| tr A-Za-z N-ZA-Mn-za-m > %" Save unrotated in file: "\012) which would, when "@x" is typed at the article or pager level, prompt for the name of a file in which to save the unrot-13'ed article. The filename provided, if not absolute, will be relative to the default directory (the "-d" switch which can be seen with the "&" summary) which is typically ~/News. There might be niftier ways to do this so it behaves like "s" and "w" as far as arguments are concerned. Note that this is untested because I don't use rn. It also saves the headers rotated to something pretty incomprehensible. Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))