Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!crdgw1!crdgw1.ge.com!barnett From: barnett@crdgw1.crd.ge.com (Bruce Barnett) Newsgroups: comp.unix.wizards Subject: Reading raw input from /dev/tty using shell Message-ID: <52@crdgw1.crd.ge.com> Date: 17 Mar 89 03:58:28 GMT Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.crd.ge.com (Bruce Barnett) Organization: GE Corp. R & D, Schenectady, NY Lines: 19 Does anyone know a clever method of reading raw data from /dev/tty using a shell script and standard Unix tools? I have a C program, but was wondering if there is some way I could accomplish this using a Vanilla SunOS 4.0 system. The data is variable length, 6 to 8 characters, and always ends with a known character (ascii 't'). In fact, the data should be in the input queue before the program is started, and is a terminal's response to an escape sequence. Perhaps using stty to set eol to 't', or sending a signal? Call me a purist, but I was wondering if I could replace a 10 line C program with a 5 line shell script? :-) -- Bruce G. Barnett a.k.a. uunet!steinmetz!barnett,