tlpsend.rc - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tlpsend.rc (377B)
---
1 #!/usr/local/plan9/bin/rc
2 if (! ~ $DEBUG '') { flag x + }
3 if (test -e /net/tcp/clone) {
4 dialstring=`{ndb/query sys $1 dom}
5 network=tcp
6 if (~ $#dialstring 0 || ! ~ $dialstring '') {
7 dialstring=$1
8 }
9 if(lpsend $network^!^$dialstring^!printer) exit ''
10 rv='tcp failed'
11 }
12 if not rv='no tcp'
13
14
15 if (! ~ $dialstring '')
16 exit 'lpsend: no dialstring'
17 if not
18 exit 'lpsend: '^$rv