Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!gerry From: gerry@jts.com (Gerry Roderick Singleton ) Newsgroups: comp.unix.questions Subject: Re: get terminal speed from shell script Message-ID: <1990Aug20.020510.10277@jts.com> Date: 20 Aug 90 02:05:10 GMT References: <1990Aug14.181010.29571@jts.com> <12584@hydra.gatech.EDU> Organization: JTS Computer Systems Ltd. Lines: 32 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] >-- Yup, you sure do but the following works on SunOS3.5, SunOS 4.0.3x, BSD4.3(isi) and SPARC 4.1: #! /bin/sh speed= eval 'stty speed' echo $speed Have fun, ger -- -- G. Roderick Singleton, System and Network Administrator, JTS Computers {uunet | geac | torsqnt}!gerry@jtsv16.jts.com