Redirect one input from one terminal to another

Posted by Niki Yoshiuchi on Super User See other posts from Super User or by Niki Yoshiuchi
Published on 2010-05-26T18:17:40Z Indexed on 2010/05/26 18:21 UTC
Read the original article Hit count: 305

Filed under:
|
|
|
|

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect the input from one to the other.

From what I understand, in /dev/pts/130 I can type:

cat </dev/pts/29

And then when I type in /dev/pts/29 the characters I type should show up in /dev/pts/130. However what ends up happening is that every other character I type gets redirected. For example, if I type "hello" I get this:

/dev/pts/29        |        /dev/pts/130

$                  |        $ cat </dev/pts/29
$ el               |        hlo

This is really frustrating as I need to do this in order to redirect the io of a process running in gdb (I've tried both run /dev/pts/# and set inferior-tty /dev/pts/# and both resulted in the aforementioned behavior). Am I doing something wrong, or is this a bug in bash/screen/dvtm?

© Super User or respective owner

Related posts about linux

Related posts about unix