how to stty another terminal?
Kartik Subbarao
subbarao at phoenix.Princeton.EDU
Sat Dec 8 01:17:29 AEST 1990
In article <1990Dec07.055142.11132 at eecs.wsu.edu> rnelson at yoda.UUCP (Roger Nelson) writes:
>------
>
>How to you stty a terminal line that you are not currently connected to.
>
>Specifically I have written a small C shell script that prints to a local
>printer connected to a terminal (even if you are not logged in with that
>terminal). This works fine (NL is mapped to CR LF) as long as someone is
>logged in with the terminal. When no one is logged in with the terminal,
>NL is only mapped to LF.
>
>So what I would like to do is specify the device, something like:
>
> stty -d ttyd4 onlcr
>
>Is there a way?
Yes. Either stty onlcr < /dev/ttyd4, stty onclr > /dev/ttyd4
( I'm not sure which one. )
Or just open /dev/ttyd4, load in the struct sgttyb (or termio for SunOS),
diddle the right flags, and then issue the appropriate ioctl().
-Kartik
--
(I need a new .signature -- any suggestions?)
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik at silvertone.Princeton.EDU (NeXT mail) -|
SUBBARAO at PUCC.BITNET - Bitnet
More information about the Comp.unix.questions
mailing list