home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10057 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.4 KB  |  34 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!cs.utexas.edu!wupost!swbatl!oktext!rollins
  3. From: rollins@oktext.sbc.com (Steven D. Rollins)
  4. Subject: Re: dumping text to a local printer attached to a terminal?
  5. Message-ID: <1992Aug12.142109.12980@swbatl.sbc.com>
  6. Sender: usenet@swbatl.sbc.com
  7. Reply-To: rollins@oktext.UUCP (Steven D. Rollins)
  8. Organization: Southwestern Bell
  9. References: <drenze.713553624@icaen.uiowa.edu>
  10. Date: Wed, 12 Aug 92 14:21:09 GMT
  11. Lines: 21
  12.  
  13. >I realize that this is probably an RTFM-type question, but would someone please
  14. >be so kind as to tell me how it's done?  I'm using my personal computer over
  15. >a dial-up line in vt100 emulation mode, and would like some of the stuff I'm
  16. >working on to be able to dump output directly to a locally-attached printer
  17. >(...and would like to be able to do it generically from the termcap, as the
  18. >software is to be used by others and will not always necessarily be used
  19. >with a vt100 emulation).
  20. >-- 
  21. >| Douglas J Renze            
  22.  
  23.     This little script might work for you, it does for me. The first
  24.     line turns on vt100 print-pass-thru. the second cats your file to
  25.     the screen but since print-pass-thru is on, it is rerouted to the
  26.     printer.  The 3rd line ejects the last page.  The last line turns
  27.     print-pass-thru off, thereby reverting output to your screen.
  28.     Filename: pcp 
  29.         echo "\033[5i"
  30.         cat $1 
  31.         echo "\014"
  32.         echo "\033[4i"
  33.  
  34.