Xref: utzoo comp.unix.questions:24621 comp.unix.wizards:23423 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: get terminal speed from shell script Message-ID: <2857@wyse.wyse.com> Date: 14 Aug 90 01:21:24 GMT References: <90Aug12.135618edt.18763@me.utoronto.ca> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Followup-To: comp.unix.questions Organization: Wyse Technology Lines: 34 In article <90Aug12.135618edt.18763@me.utoronto.ca> sun@hammer.me.UUCP (Andy Sun Anu-guest) writes: >Hi Net, > >The question I have is: > >Is there a way to get the terminal speed from a (sh or csh) script? > >I used to be able to do the following in a Bourne shell script: > > speed=`stty speed` > >and got the terminal speed assigned to variable speed. As various OS >gets updated (e.g. Ultrix 3.1 and SUN OS 4.0.3), this won't work anymore >because all stty outputs are being sent to stderr, not stdout, thus no >piping or redirection is possible. Is there any similar commands that can You CAN still cause redirection to occur. >get terminal speed inside a shell script? I just tried the following: date>date.data echo 'echo date.data >&2 # sends file name to standard error' > errout chmod +x errout cat `errout` # date.data appeared on screen, cat read terminal # this is the expected result cat `errout 2>&1` # the date stored in the file was cat'ed to the screen Of course, this is the Bourne shell, not csh. I cannot vouch for how or if this is possible with csh. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com