On Mon, Oct 26, 2009 at 14:40, Isaac Atilano <aristophrenic at warpmail.net> wrote:
>
>
> I'd like to send commands from one terminal and have them run on
> another.
>
> I'm accessing my pc through ssh on /dev/pts/0 and /dev/pts/1.
>
> I am able to write from one terminal to another, e.g., on pts 0
> #echo 'Hi There'>/dev/pts/1
> "Hi There" then appears on pts1.
>
> I want to be able to do something like
> echo 'progname'>/dev/pts/1
> and have progname submitted through the shell on pts1.
>
> Is there any way of doing this in Linux using shell commands?

maybe you want to use a fifo, man mkfifo

generally you create a fifo, write to it as if it is a file from one
program, and read from it from another program as if it is a file.
Actually it is a two-way communications channel, so you can pass
messages both ways.