if test -z "$1"; then
	echo "Usage: arcx archive"
	exit 1
fi
if test -f "$1"; then
	NAME=`arcname <$1`
	CODE="$?"
	case $CODE in
	1)	arcstrip <$1 > "$NAME";;
	2)	arcstrip <$1 > "$NAME";;
	3)	arcstrip <$1 | arcunrun > "$NAME";;
	8)	arctoZ <$1 | compress -d | arcunrun > "$NAME";;
	9)	exit 1;;
	*)	echo "arcx: Cannot extract $NAME in code $CODE archive"
		exit 1;;
	esac
	echo "arcx: File $NAME extracted"
else
	echo "arcx: Cannot open $1"
	exit 1
fi
