🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6077

Re: PostScript from Unix tty

#6077
From: Christopher J. Hawley
Date: Tue, 21 May 1991 22:47
33 lines
2110 bytes
    In article <24889@well.sf.ca.us>, shiva@well.sf.ca.us (Kenneth Porter)
writes:

|> You should be able to send any character (including CTRL-D, the
|> PostScript EOF) through a Unix tty if you first open it in raw
|> mode. You can use stty together with cat to put the port in raw
|> mode and send characters:
|>  
|> (stty -raw; cat foo.ps) > /dev/ttyxx
         ^----  you mean "raw" (no dash), didn't you?

    The above example will probably not work if you're running under System V
or V7 UNIX or derivatives of same, due to a difference of convention for the
 stty(1)  command.  On such systems,  stty  uses __standard input__ to access
the tty, and sends output (if any) to standard output; contrast this with BSD
 stty(1bsd) , which accesses the tty via standard output and sends its output
to standard error.

    Thus, to achieve the intended effect under System V and friends, you
would want to do something like this:

		(stty raw; cat foo.ps; stty -raw) </dev/ttyxx >/dev/ttyxx

I don't know if the last command is required, but it is polite.

|> Ken (shiva@well.sf.ca.us)
---
    Christopher J. Hawley / esper               chawley@sundiver.esd.sgi.com
    Silicon Graphics, Inc.    1L-945            phone:  415 / 335-1621
    Mountain View, CA   94039-7311  USA                 408 / 243-1042
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    "Nicht nur wie schnell Sie fahren, sondern _wie_ Sie schnell fahren."
Technical Details
Message-ID: <1991May21.224701.1144@odin.corp.sgi.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!sundiver.esd.sgi.com!chawley
References: <24889@well.sf.ca.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!sundiver.esd.sgi.com!chawley
From: chawley@sundiver.esd.sgi.com (Christopher J. Hawley)
Newsgroups: comp.lang.postscript
Subject: Re: PostScript from Unix tty
Keywords: bsd sys5
Message-ID: <1991May21.224701.1144@odin.corp.sgi.com>
Date: 21 May 91 22:47:01 GMT
References: <24889@well.sf.ca.us>
Sender: news@odin.corp.sgi.com (Net News)
Reply-To: chawley@sundiver.esd.sgi.com
Distribution: comp
Organization: Silicon Graphics, Inc.  /  Personal Systems Division
Lines: 33