From: Rick <ri...@ll...> - 2007-01-29 15:26:50
|
Jim Preston <jmpgumstix <at> nubinary.com> writes: > > > I > tried something similar for my project, but had to go with a C program to > do the > reading (per Dave, I believe). > I > haven't done it yet, but the reason was as stated below: the shell script is > buffered and so it requires a <cr> to read the last line > sent. > Since > (in my project) that last line is the EOF, I _really_ needed it > :) > Have you looked at socat ? NAME socat - Multipurpose relay (SOcket CAT) DESCRIPTION Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them. Because the streams can be constructed from a large set of different types of data sinks and sources (see address types), and because lots of address options may be applied to the streams, socat can be used for many different purposes. It might be one of the tools that one`has already needed'. EXAMPLE socat - /dev/ttyS0,raw,echo=0,crnl Opens an interactive connection via the serial line, e.g. for talking with a modem. raw and echo set ttyS0's terminal parameters to practicable values, crnl converts to correct newline characters. Consider using READLINE instead of `-'. Rick |