1#!/bin/rc 2fn sigexit {echo -n '[4i';exit 1} 3# Send output to the printer port on an AT&T 630/730 terminal 4# Process and enqueue files to be printed 5# take arguments as input files 6i=0 7if (~ $#* 0) *='' 8for (j in $*) { 9 i= `{echo $i + 1|hoc} 10 11# check access to the file so that you know that a failure in the 12# processing is a drastic error which will cause an exit from lp. 13 14 if (~ $j '' || test -f $j) { 15 switch ($j) { 16 case ''; @{ 17 echo -n '[5i'; sleep 1 18 bind -b $LPLIB/process /bin 19 $LPPROC 20 echo -n '[4i' 21 } 22 case *; @{ 23 echo -n '[5i'; sleep 1 24 bind -b $LPLIB/process /bin 25 $LPPROC 26 echo -n '[4i' 27 } <$j 28 } 29 } 30} 31