aboutsummaryrefslogtreecommitdiff
path: root/lp/spooler/nospool
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-08-31 02:15:26 +0000
committerrsc <devnull@localhost>2005-08-31 02:15:26 +0000
commit6174642093bdcef4116ae78dbdf4f2e608494258 (patch)
treeb916d25347295ee15b35434b92011b31fd76862c /lp/spooler/nospool
parent9f1d53a09bdd8f99e9f81a344c7fa6b5161e1359 (diff)
downloadplan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.gz
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.bz2
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.zip
Initial lp.
Diffstat (limited to 'lp/spooler/nospool')
-rwxr-xr-xlp/spooler/nospool21
1 files changed, 21 insertions, 0 deletions
diff --git a/lp/spooler/nospool b/lp/spooler/nospool
new file mode 100755
index 00000000..4d019983
--- /dev/null
+++ b/lp/spooler/nospool
@@ -0,0 +1,21 @@
+#!/usr/local/plan9/bin/rc
+if (! ~ $DEBUG '') flag x +
+
+if (~ $LPCLASS *sendEOT*) SENDEOT=1
+if not SENDEOT=0
+
+if (~ $OUTDEV -) OUTDEV=/dev/stdout
+if (~ $#* 0) {
+ if (! ~ $DEBUG '') echo input file is stdin >[1=2]
+ lpsub process $LPPROC >$OUTDEV
+ if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
+}
+if not {
+ if (! ~ $DEBUG '') echo input files $* >[1=2]
+ for (i in $*) {
+ if (! ~ $DEBUG '') echo processing $i >[1=2]
+ lpsub process $LPPROC < $i > $OUTDEV
+ if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
+ }
+}
+exit ''