print 314 B

123456789101112
  1. #!/bin/rc
  2. # usbprint - bind usb printer endpoint to /dev/lp
  3. rfork e
  4. for (id in /dev/usb[0-9]*/[0-9]*)
  5. if (grep -s 'Enabled 0x020107' $id/status >[2]/dev/null){
  6. echo -n 'ep 2 bulk w 64 32' >$id/ctl
  7. aux/stub /dev/lp
  8. bind $id/ep2data /dev/lp
  9. exit ''
  10. }
  11. echo $0: no usb printer found >[1=2]
  12. exit 'no printer'