Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/lib/lp/stat/xerox-N32

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
if (! ~ $DEBUG '') flag x +

if (~ $THIS_HOST $DEST_HOST) {
	if (test -f $LPLIB/log/$LPDEST^.st) {
		echo job transmission status:
		tail -3 $LPLIB/log/$LPDEST^.st
	}
	cd $LPSPOOL
	if (test -d $LPDEST) {
		once=''
		for (i in `{bind -b $LPLIB/sched /bin;$SCHED $LPDEST}) {
			if (~ $once '') {
				echo
				echo queue on $THIS_HOST:
				echo 'job		user	try	size'
				once=1
			}
			STATLINE=`{cat $LPDEST/$i^id}
			LSLINE=`{ls -l $LPDEST/$i}
			echo $STATLINE(1)^$STATLINE(3)'	'$STATLINE(2)'	'$STATLINE(4)'	'$LSLINE(6)
		}
	}
	echo
	echo 'checking the printers queue (type DELETE to abort):'
	/$cputype/bin/aux/lpdsend -dRAW -q $OUTDEV
}
if not {
	{ echo -d$LPDEST -q; sleep 5 } | lpsend.rc $DEST_HOST
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].