Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.unix.wizards Subject: Re: Which is more portable: stty < or stty > Message-ID: Date: 14 Mar 90 20:08:58 GMT References: <3354@muffin.cme.nist.gov> <12339@smoke.BRL.MIL> Sender: news@mhres.mh.nl Organization: Multihouse Gouda, the Netherlands Lines: 32 In-reply-to: jv@mh.nl's message of 13 Mar 90 23:23:12 GMT In article jv@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@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@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" -------------------------