set x=`stty speed` still fails on Ultrix 4.1

Christos S. Zoulas christos at theory.tn.cornell.edu
Thu Feb 28 06:04:45 AEST 1991


In article <1991Jan30.073059.19868 at watcgl.waterloo.edu> idallen at watcgl.waterloo.edu (Ian! D. Allen [CGL]) writes:
>Another Ultrix bug I thought would have been fixed years ago.
>
>  % set x=`stty speed`
>  stty: : Not a typewriter
>
>This happens because stty normally does its ioctl's on stdout and prints
>on stderr.  The other Unix systems I use are smart enough to fiddle with
>the units so that you can use `stty speed` to actually find out the baud
>rate of your tty in a shell script.  You'll find that no combination of
>i/o redirection (even using units in /bin/sh) will work on Ultrix.

This is not true...

% set x=`sh -c "stty everything 2>&1 > /dev/tty" | awk '{ if ( $1 == "speed" ) print( $2 ); }'`

christos
-- 
+------------------------------------------------------------------------+
| Christos Zoulas         | 389 Theory Center, Electrical Engineering,   |
| christos at ee.cornell.edu | Cornell University, Ithaca NY 14853.         |
| christos at crnlee.bitnet  | Phone: (607) 255 0302 |  Fax: (607) 254 4565 |



More information about the Comp.unix.ultrix mailing list