[lug] Easy one for the ones who know ;)

rm at mamma.varadinet.de rm at mamma.varadinet.de
Tue Jun 13 15:26:20 MDT 2000


On Tue, Jun 13, 2000 at 02:10:01PM -0700, Hector M Banda wrote:
> 
> HI all,
> How can I make LINUX to listen to a particular tty ( com1 or port 2 )
> and create a file out of the input info?

 'cat /dev/ttyS0 > data.file '

> What I want to do is capture the information to a file coming from the line
> and then import the information to database to be processed.

Of course this really depends on the kind of data
you expect to come in and the protocol used on the 
line. Isthere a terminal attached to the port or
just some dumb device (like a termometer etc.).
I usually write little wrappers in perl or C
to read the data and maybe reopen the file in
case youget an EOF.

Ralf





More information about the LUG mailing list