Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site calmasd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!decvax!genrad!panda!talcott!harvard!seismo!hao!hplabs!sdcrdcf!sdcsvax!sdcc3!sdcc6!calmasd!jpm From: jpm@calmasd.UUCP (John McNally) Newsgroups: net.jokes Subject: HOW TO ROTATE/UNROTATE TEXT Message-ID: <407@calmasd.UUCP> Date: Fri, 24-May-85 16:45:34 EDT Article-I.D.: calmasd.407 Posted: Fri May 24 16:45:34 1985 Date-Received: Wed, 29-May-85 23:36:57 EDT Organization: Calma Company, San Diego, CA Lines: 34 Sorry to put this is net.jokes. It really belongs in net.jokes.d, but the requestor of this information posted it to net.jokes, so I assumed they wouldn't see this elsewhere. Someone requested how to handle rot13 out of the context of readnews. I don't remember the actual article or requestor. Someone else posted this about six months ago (I don't remember the poster. What a memory!): tr A-Za-z N-ZA-Mn-za-m This uses the UNIX translate command. I alias this to a command called rot, which then takes standard in and standard out: rot < rotated.text > unrotated.text The nifty thing about rot13 is that it is idempotent (I think this is the correct term). That is: f(x) = y, f(y) = x So, with rot you can also: rot < unrotated.text > rotated.text If you think about it awhile you will see that this is obviously true, because rot13 just shifts every letter 13 letters forward in the alphabet (in a circular fashion). Two rotations produce a 26 letter shift, which is an identity operation. For further reading, see the manual page for tr. -- John McNally Calma 11080 Roselle St. San Diego CA 92121 ...{ucbvax,decvax}!sdcsvax!calmasd!jpm (619)-458-3230