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