#!/bin/csh -f

set zsigs = (\
"line 1" \
"line 2" \
"line 3\!" \
)

set index = `jot -r 1 1 $#zsigs`
# Need to check to make sure that the $index is in the right bounds, because
# rs6000s have been known to not work right in this reguard.
if ($index <1 || $index>$#zsigs) then
	if ($index<0) then
	@ index = - $index
	endif
@ index = $index % $#zsigs
@ index = $index + 1
endif

zwrite -n -s "$zsigs[$index]" $argv

echo "$zsigs[$index]"
