Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/lib/lp/bin/lpsend.rc

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


#!/bin/rc
# lpsend.rc dialstring - run lpsend network!dialstring!printer
if (! ~ $DEBUG '')
	flag x +
if (! test -e /net/tcp/clone)
	exit 'no tcp'

dialstring=`{ndb/query sys $1 dom}
if (~ $#dialstring 0 || ~ $dialstring '')	# no dom for sys in ndb?
	dialstring=$1				# use arg unchanged

lpsend tcp!^$dialstring^!printer
exit $status

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.