# Printer script for running Milan 3000x print server. # Note that names and ports are in the file /etc/printers # in the format: # printer_name:host_name:port_number # PATH="/bin:/usr/bin:/usr/lib:/usr/local/bin:/u/bin" export PATH printer=`basename $0` request=$1 name=$2 title=$3 copies=$4 options=$5 shift; shift; shift; shift; shift # Look for HOST and Port address PRTSETUP=`grep "^$printer:" /etc/printers` if [ $? = 0 ] then PRTHOST=`echo $PRTSETUP|awk -F: '{ print $2 }'` PRTPORT=`echo $PRTSETUP|awk -F: '{ print $3 }'` else exit 1 fi ( files="$*" i=1 copies=1 while [ $i -le $copies ] do for file in $files do cat $file|lponlcr echo "\033E\c" done i=`expr $i + 1` done )|netcat -h $PRTHOST -p $PRTPORT