how to stty another terminal?

Stephen J. Friedl friedl at mtndew.Tustin.CA.US
Sun Dec 16 08:09:47 AEST 1990


Dan Mercer writes:

> stty acts upon stdin - thus 'stty onlcr < /dev/ttyd4' will be correct.
> However,  you must have permissions set up correctly to allow this.

You can always do this the sneaky way:

	$ stty whatever 3>/dev/ttyd4 0<&3

The 3>/dev/ttyd4 gives you a writable descriptor to the terminal
and then the 0<&3 redirects input from that place.  You do not require
read permission on the device being set (on System V, at least).

Also note that older versions of BSD (4.1?) did stty on their stdout.

     Steve

-- 
Stephen J. Friedl, KA8CMY  /  3B2-kind-of-guy  /  Tustin, CA / 3B2-kind-of-guy
+1 714 544 6561  / friedl at mtndew.Tustin.CA.US  / {uunet,attmail}!mtndew!friedl

"If it doesn't core dump, ship it" - Gary W. Keefe, on product development



More information about the Comp.unix.questions mailing list