lpsend.rc 335 B

12345678910111213
  1. #!/bin/rc
  2. # lpsend.rc dialstring - run lpsend network!dialstring!printer
  3. if (! ~ $DEBUG '')
  4. flag x +
  5. if (! test -e /net/tcp/clone)
  6. exit 'no tcp'
  7. dialstring=`{ndb/query sys $1 dom}
  8. if (~ $#dialstring 0 || ~ $dialstring '') # no dom for sys in ndb?
  9. dialstring=$1 # use arg unchanged
  10. lpsend tcp!^$dialstring^!printer
  11. exit $status