Which is more portable: stty < or stty >

Johan Vromans jv at mh.nl
Thu Mar 15 06:08:58 AEST 1990


In article <JV.90Mar13162312 at squirrel.mh.nl> jv at mh.nl (Johan Vromans) writes:

 `[SystemV:]
 `
 `	STTY_FLAGS=`stty -g < /dev/tty`
 `	sane() { stty ${STTY_FLAGS}; }
 `
 `You can't do this from your BSD .login .

To which andyb at coat.com (Andy Behrens) replies:

 `	STTY_OUTPUT=`stty 2>&1 >/dev/tty`
 `
 `Of course, BSD doesn't support 'stty -g', but that's another issue.

My BSD system (Ultrix) does. But I mentioned a '.login' file for Csh.

Maarten "als iemand 't kan, is hij het wel" Lithmaat replies:

 `Indeed.  But if BSD's stty(1) would have had `-g', you *could* have done:
 `
 `	set STTY_FLAGS="`(stty -g > /dev/tty) |& cat`"

Now this works.

Johan
--
Johan Vromans				       jv at mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------



More information about the Comp.unix.wizards mailing list