Path: utzoo!attcan!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!batcomputer!theory.tn.cornell.edu!christos From: christos@theory.tn.cornell.edu (Christos S. Zoulas) Newsgroups: comp.unix.ultrix Subject: Re: set x=`stty speed` still fails on Ultrix 4.1 Message-ID: <1991Feb27.190445.9065@batcomputer.tn.cornell.edu> Date: 27 Feb 91 19:04:45 GMT References: <1991Jan30.073059.19868@watcgl.waterloo.edu> Sender: news@batcomputer.tn.cornell.edu Organization: Electrical Engineering, Cornell University, Ithaca NY Lines: 22 Nntp-Posting-Host: theory.tn.cornell.edu In article <1991Jan30.073059.19868@watcgl.waterloo.edu> idallen@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@ee.cornell.edu | Cornell University, Ithaca NY 14853. | | christos@crnlee.bitnet | Phone: (607) 255 0302 | Fax: (607) 254 4565 |