Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!jtsv16!gerry From: gerry@jts.com (Gerry Roderick Singleton ) Newsgroups: comp.unix.questions Subject: Re: get terminal speed from shell script Message-ID: <1990Aug17.034401.12720@jts.com> Date: 17 Aug 90 03:44:01 GMT References: <1990Aug14.181010.29571@jts.com> <12584@hydra.gatech.EDU> Organization: JTS Computer Systems Ltd. Lines: 42 In article <12584@hydra.gatech.EDU> gt0178a@prism.gatech.EDU (BURNS,JIM) writes: >in article <1990Aug14.181010.29571@jts.com>, gerry@jts.com (Gerry Roderick Singleton ) says: >> #! /bin/sh >> >> speed=`stty speed &1` >> echo $speed > >Nope, on SunOS 4.0, you get: > >{richsun12:/usr} >[196] t=`stty speed &1` >{richsun12:/usr} >[197] echo $t >stty: Operation not supported on socket >{richsun12:/usr} >[198] >-- Hmm, that's true when you're in a window. I did not interpret the original question as being window specific but the more general case of working with ttys and pttys. The script DOES work for real ttys and ti even works on pttys over RPC links. Here's the output under these circumstances as executed with /bin/sh -vx foo, where foo is the four lines above: #! /bin/sh speed=`stty speed &1` + stty speed speed=9600 echo $speed + echo 9600 9600 I have no window system solution, so I hope one of the window system gurus can help. ger -- -- G. Roderick Singleton, System and Network Administrator, JTS Computers {uunet | geac | torsqnt}!gerry@jtsv16.jts.com