Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site tekred.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxb!houxm!whuxl!whuxlm!akgua!mcnc!decvax!tektronix!tekred!ronbe From: ronbe@tekred.UUCP (Ron Bemis ) Newsgroups: net.jokes.d Subject: Rotating jokes (source) Message-ID: <248@tekred.UUCP> Date: Wed, 20-Feb-85 19:57:49 EST Article-I.D.: tekred.248 Posted: Wed Feb 20 19:57:49 1985 Date-Received: Wed, 27-Feb-85 04:09:06 EST Organization: Tektronix, Redmond OR Lines: 48 Here's what I use to "unrot" jokes -- I have this in my ~/bin directory which is second in my $path. I suppose I should apologize for posting source code to something other than *.sources, but I don't think anyone else would be interested in it. This is csh stuff. After moving it into bin/rot do a "chmod 7XX bin/rot" to make it executable. Works great for readnews, I've never had the chance to use rn... -------------------------------------------------- # Rotate and save a news file # From readnews, type s | rot (filename) if ($#argv < 1) then set file = $NEWSBOX/Articles else set file = $NEWSBOX/$1 endif if (-e $file) then if (-f $file) then set mess=": Appended" else echo "Cannot append to $file." exit 1 endif else set mess=": New file" endif sed\ -e '/^$/,$y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/NOPQRSTUVWXYZABCDEFGHIJKLM/'\ -e '/^$/,$y/abcdefghijklmnopqrstuvwxyz/nopqrstuvwxyzabcdefghijklm/'\ >> $file echo $file$mess -------------------------------------------------- -- tektronix!tekred!ronbe _____ Support Bacteria - Ron Bemis / o o \ It's the only Tektronix | \___/ | culture some Redmond, OR \_____/ people have!