in reply to Re: serial port bridge (virtual)
in thread serial port bridge (virtual)

I have found a solution all be it not very elegant.

I'm not using perl at all.

I used mkfifo to create two files

then "cat /dev/ttya | tee /fifo.file1 | cat > /fifo.file2 &"

Replies are listed 'Best First'.
Re^3: serial port bridge (virtual)
by Eliya (Vicar) on Feb 21, 2011 at 07:32 UTC
     cat /dev/ttya | tee /fifo.file1 | cat > /fifo.file2 &

    You can most likely get rid of the second cat, because '| cat >' is the same as '>', wrt functionality:

    $ echo foo | cat > myfile $ cat myfile foo $ echo foo > myfile $ cat myfile foo