1#!/bin/rc 2if (! ~ $DEBUG '') flag x + 3 4if (~ $LPCLASS *sendEOT*) SENDEOT=1 5if not SENDEOT=0 6 7if (~ $OUTDEV -) OUTDEV=/fd/1 8if (~ $#* 0) { 9 if (! ~ $DEBUG '') echo input file is stdin >[1=2] 10 @{bind -b $LPLIB/process /bin; $LPPROC} > $OUTDEV 11 if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV 12} 13if not { 14 if (! ~ $DEBUG '') echo input files $* >[1=2] 15 for (i in $*) { 16 if (! ~ $DEBUG '') echo processing $i >[1=2] 17 @{bind -b $LPLIB/process /bin; $LPPROC} < $i > $OUTDEV 18 if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV 19 } 20} 21exit '' 22