LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   write commands from one terminal to another (https://www.linuxquestions.org/questions/linux-newbie-8/write-commands-from-one-terminal-to-another-942123/)

1122aa3344 04-27-2012 12:31 PM

write commands from one terminal to another
 
hi.

i need to write commands from one terminal to anoter terminal.

i tried these:
echo -e "ls\n" > /proc/<terminal_pid>/FD/0
echo -e "ls\n" > /dev/pts/4
which just print the ls as output and doesnt execute

and i even tried these:
chmod 777 /dev/tty4 ;echo "ls" > /dev/tty4
chmod 777 /dev/tty40 ;echo "ls" > /dev/tty40
but it doesn't seem to do anything

any ideas?..
[note that i dont want to touch the second terminal to accomplish this]

spiky0011 04-27-2012 03:25 PM

Hi

Dose this page help

1122aa3344 04-27-2012 05:01 PM

not really. i have already seen this page before.
to use a named pipe i need to write commands in the second terminal too,
but i don't want to touch the second terminal, only use the first terminal.
thanks though :)
any other ideas?


All times are GMT -5. The time now is 11:47 AM.