Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/lib/lp/spooler/ps630

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


#!/bin/rc
fn sigexit {echo -n '';exit 1}
# Send output to the printer port on an AT&T 630/730 terminal
# Process and enqueue files to be printed
# take arguments as input files
i=0
if (~ $#* 0) *=''
for (j in $*) {
	i= `{echo $i + 1|hoc}

# check access to the file so that you know that a failure in the
# processing is a drastic error which will cause an exit from lp.

	if (~ $j '' || test -f $j) {
		switch ($j) {
		case ''; @{
				echo -n ''; sleep 1
				bind -b $LPLIB/process /bin
				$LPPROC
				echo -n ''
			}
		case *;	@{
				echo -n ''; sleep 1
				bind -b $LPLIB/process /bin
				$LPPROC
				echo -n ''
			} <$j
		}
	}
}

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].