Which is more portable: stty < or stty >

Maarten Litmaath maart at cs.vu.nl
Wed Mar 14 04:22:32 AEST 1990


In article <JV.90Mar13162312 at squirrel.mh.nl>,
	jv at mh.nl (Johan Vromans) writes:
)...
)	STTY_FLAGS=`stty -g < /dev/tty`
)	sane() { stty ${STTY_FLAGS}; }
)
)You can't do this from your BSD .login .

Indeed.  But if BSD's stty(1) would have had `-g', you *could* have done:

	STTY_FLAGS=`stty -g 2>&1 > /dev/tty`

Csh:
	set STTY_FLAGS="`(stty -g > /dev/tty) |& cat`"

(Both work on SunOS 4.0.3c.)
I agree, however, that the SysV method is easier.
--
 1) Will 4.5BSD have wait5()?         |Maarten Litmaath @ VU Amsterdam:
 2) Sleep(3) should be sleep(2) again.|maart at cs.vu.nl, uunet!mcsun!botter!maart



More information about the Comp.unix.wizards mailing list