#!/bin/ksh
DIRS=`ls`
for i in ${DIRS}
do
if [ -d ${i} ]
then
	echo "TARing ${i} ..."
	tar cf ${i}.tar ${i}
	echo "GZIPing ${i}.tar ..."
	gzip ${i}.tar
	if [ -r ${i}.tar.gz ]
	then
		echo "Removing directory ${i} ..."
		rm -r ${i}
	fi
else
	echo "Skipping non-directory ${i}."
fi
done
