1 61746420 2005-08-31 devnull #!/usr/local/plan9/bin/rc
2 61746420 2005-08-31 devnull if (! ~ $DEBUG '') flag x +
4 61746420 2005-08-31 devnull if (~ $LPCLASS *sendEOT*) SENDEOT=1
5 61746420 2005-08-31 devnull if not SENDEOT=0
7 61746420 2005-08-31 devnull if (~ $OUTDEV -) OUTDEV=/dev/stdout
8 61746420 2005-08-31 devnull if (~ $#* 0) {
9 61746420 2005-08-31 devnull if (! ~ $DEBUG '') echo input file is stdin >[1=2]
10 61746420 2005-08-31 devnull lpsub process $LPPROC >$OUTDEV
11 61746420 2005-08-31 devnull if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
14 61746420 2005-08-31 devnull if (! ~ $DEBUG '') echo input files $* >[1=2]
15 61746420 2005-08-31 devnull for (i in $*) {
16 61746420 2005-08-31 devnull if (! ~ $DEBUG '') echo processing $i >[1=2]
17 61746420 2005-08-31 devnull lpsub process $LPPROC < $i > $OUTDEV
18 61746420 2005-08-31 devnull if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV