: "@(#)mach_print.sh	6.1	1/6/87"
# Revision 1.1  85/08/14  11:09:38  root
# Initial revision
# 
: send one or more files to a printer connected to a remote machine
:
machprtr=`basename $0`
machine=`expr $machprtr : '\(.*\):.*'`
printer=`expr $machprtr : '.*:\(.*\)'`
printid=$1
user=$2
title=$3
copies=$4
options=$5
shift; shift; shift; shift; shift
files="$*"
for file in $files
do
  if rsh $machine lp -d$printer -n$copies -t\"$title\" -o\"$options\" -s -u$user < $file
  then
      disable -r"remote machine unavailable" $0
  fi
done
