Received: from ATHENA-AS-WELL.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA06893; Wed, 24 Mar 93 18:51:27 EST
Received: from OLIVER.MIT.EDU by Athena.MIT.EDU with SMTP
	id AA07953; Wed, 24 Mar 93 18:51:25 EST
From: sorokin@Athena.MIT.EDU
Received: by oliver.MIT.EDU (AIX 3.2/UCB 5.64/4.7) id AA16813; Wed, 24 Mar 1993 18:51:24 -0500
Message-Id: <9303242351.AA16813@oliver.MIT.EDU>
To: abbe@Athena.MIT.EDU
Subject: randomizer manpage
Date: Wed, 24 Mar 93 18:51:23 EST

ooo ah, ross commented his randomizer! how much more userfriendly do you
want it? i mean, i can make it so that an illiterate can use it, or
leave it as-is, or somewhere in between. up to you.

jessie

#!/bin/csh -f

# zephyr randomizing script by
# Ross Lippert class of 1993
# modified by
# Richard J. Barbalace
# 31 January 1992
#
# Use in place of "zwrite" as your zephyring command
# and it gives you one of the zsigs on the list.  It
# also echoes the zsig it used for each message upon
# sending it.
# All arguments other than a signature argument
# are passed directly to the call to "zwrite".
#
# INSTALLATION
# I recommend that you have ".z" in your homedirectory
# and then have an alias like
# alias rz "~/.z"
# in an appropriate file so that you can refer to the
# command as "rz" in any directory.
# 
# Don't forget to do a "chmod 700 ~/.z" on it so Unix
# knows that .z should be executable.
#
# Lastly, putting your zsigs in place of the ones I use 
# in this file should be elementary.  However, certain
# characters like ! have special meanings so you should
# backslash them.
#
# Enjoy
#     -ross

set zsigs = (\
"@large(@bold(Get over it.))"\
"I am not a number\! I am a free variable\!"\
"And exchanged love's bright and fragile glow for the glitter and the rouge"\
)
# Choose a random zsig
set index = `jot -r 1 1 $#zsigs`
# need this hack incase jot doesn't work right (eg rs6000s)
if ($index < 1 || $index > $#zsigs) then
	if ($index < 0) then
		@ index = -$index
	endif
	@ index = $index % $#zsigs
	@ index = $index + 1
endif
set zsig = "$zsigs[$index]"

# If zsig is long, use small font
#set length = `echo "$zsig" | wc -c`
#if ($length > 68) then
#	set zsig = "@small($zsig)"
#endif

# Send zephyrgram
zwrite -n -s "$zsig" $argv

# Print chosen zsig
echo "$zsig"




