#!/bin/sh

# Check the number of arguments

if [ $# -ne 2 ]
then
	echo "Usage: qstat status|jobs printerhostname"
	exit 2
fi

# Make sure the first argument is legal

case $1 in
	status)
		;;
	jobs)
		;;
	*)
		echo "Usage: qstat status|jobs printerhostname"
		exit 1
		;;
esac

echo "cd $1\ndir\nbye" | ftp -n $2
