Reading raw input from /dev/tty using shell

Bruce Barnett barnett at crdgw1.crd.ge.com
Fri Mar 17 13:58:28 AEST 1989


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	<barnett at crdgw1.ge.com>  a.k.a. <barnett@[192.35.44.4]>
			uunet!steinmetz!barnett, <barnett at steinmetz.ge.com>



More information about the Comp.unix.wizards mailing list