home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.dcom.modems
- Path: sparky!uunet!stanford.edu!nntp.Stanford.EDU!johnw
- From: johnw@leland.Stanford.EDU (John Wiederhold)
- Subject: Re: Program for printing a file from a UNIX machine to a Local printer
- Message-ID: <1993Jan11.193132.7331@leland.Stanford.EDU>
- Sender: news@leland.Stanford.EDU (Mr News)
- Organization: DSG, Stanford University, CA 94305, USA
- References: <2B4DDA14.14499@ics.uci.edu>
- Date: Mon, 11 Jan 93 19:31:32 GMT
- Lines: 33
-
- In article <2B4DDA14.14499@ics.uci.edu> wngai@bonnie.ics.uci.edu (Wayne Ngai) writes:
- > Hi! I was wondering if there is/are any existing program(s) out
- >there that would allow for a PC terminal to print a file on the Unix
- >machine to the local printer that's attached to the PC terminal. e.g.
- >say I'm hook up to a Unix machine via modem, and I want to print a
- >file on the Unix machine to my PC printer. Is there anyway of doing
- >that without having to download the file to my PC and do some
- >conversion to printout the file? i.e. sending the print job to
- >printer attached to terminal. If there is such a program, could some
- >kind soul please tell me where and how can I get a hold of it?
-
- The following shell script should do the trick:
- ----------------------------CUT HERE-----------------------------
- #!/bin/sh
- echo -n '<ESC>[5i'
- if [ $# -eq 0 ]; then
- cat
- else
- cat $*
- fi
- echo
- echo -n '<ESC>[4i'
- ---------------------------CUT HERE-------------------------------
-
- Replace the "<ESC>" with the escape character (ASCII 27 I think).
- This should work on any good vt100 terminal, including Kermit and Telix.
- I call the script "pcprint" and you can type "pcprint filename" as well
- as pipe output directly to it.
-
- -John
-
-
-
-