if test $# -ne 1
then
	clear
	echo "The judge takes one file argument on the commandline.

	"
exit
fi



export DEFENDANT=$1

annotate () {
$VISUAL annote.temp
cat annote.temp >> $DEFENDANT
rm annote.temp
}


suffix () {
echo
read -p "File to append... " FILE
cat $FILE >> $DEFENDANT
}



PREVRES="prev"
RES="start"
while test $RES != $PREVRES
do


	if test $RES != "start"
	then
		echo
		read -p "	pause prompt, just hit enter..." junques
	fi



	clear
	echo "		THE JUDGE"
	ls --color $1
	stat $1 | paste
	echo
	#sls -a  -p '\'' %P %t %5skk  %-30N %c"%y%m%d.%T" %i '\''' $1
	
	du -x -h $1
	ls -l $1
	
	ls --color $1

	echo
	file $1
	echo "
	       		DELETE (rm -rf) = d
	                	     mv = m 
	                pack   tar czvf = t 
	                view   tar tzvf = v
	              unpack   tar xzvf = u
	      annotate (append comment) = a	
	               Suffix a file    = s         
	
	" 
	
	PREVRES=$RES
	echo
	read -p "d, m, t  etc.  or <enter> to quit... "   RES JUNK
	
	case $RES in
		d) rm -rf $1
		echo "*zap*"
		ls $1
		;;
		m) 
		read -p "new name =..." NN spam
		mv $1 $NN
		;;
		t) tar czvf $1.tgz $1
		;;
		v)
		tar tzvf $1
		;;
		u)
		tar xzvf $1
		;;
		a)
		annotate 
		;;
		s)
		suffix
		;;
		*)
		echo "Did nothing. See?"
		date
		ls $1
		exit
		;;
	esac
done
