Which is more portable: stty < or stty >
Andy Behrens
andyb at coat.com
Wed Mar 14 07:16:24 AEST 1990
In article <JV.90Mar13162312 at squirrel.mh.nl> jv at mh.nl (Johan Vromans) writes:
>
> [On the topic of using stdin or stdout for stty(1): System V assumes you may
> want to redirect the output somewhere other than the terminal being probed.]
>
> This seems quite logical to me, considering things like
>
> STTY_FLAGS=`stty -g < /dev/tty`
> sane() { stty ${STTY_FLAGS}; }
>
> You can't do this from your BSD .login .
You can certain capture the stty output in a variable. BSD stty probes
stdout (not stdin), but it writes to stderr (not stdout). So you could
write
STTY_OUTPUT=`stty 2>&1 >/dev/tty`
Of course, BSD doesn't support 'stty -g', but that's another issue.
--
Live justly, love gently, walk humbly.
Andy Behrens
andyb at coat.com
uucp: {uunet,rutgers}!dartvax!coat.com!andyb
Burlington Coat, PO Box 729, Lebanon, N.H. 03766 (603) 448-5000
More information about the Comp.unix.wizards
mailing list