#! /bin/csh -f
#requires a string argument
if ( $#argv != 1) then
	echo "bailing out ..."
	exit 1
endif
set cut = "/usr/bin/cut"
set a="abcdefghijklmnopqrstuvwxyz"
set b="bcdefghijklmnopqrstuvwxyza"
set A="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set B="BCDEFGHIJKLMNOPQRSTUVWXYZA"
echo "Trying shifts of $argv[1]"
set i=26
while ($i)
	echo $argv[1] | /usr/bin/tr $a$A $b$B
	set temp1 = `echo $b | $cut -c1`
	set temp2 = `echo $b | $cut -c2-26`
	set b = $temp2$temp1
	set temp1 = `echo $B | $cut -c1`
	set temp2 = `echo $B | $cut -c2-26`
	set B = $temp2$temp1
	@ i--
end
