LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2012, 01:31 PM   #1
1122aa3344
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
Cool 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]
 
Old 04-27-2012, 04:25 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,127
Blog Entries: 1

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Hi

Dose this page help
 
Old 04-27-2012, 06:01 PM   #3
1122aa3344
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Write a script to open a terminal and run a few commands. jmdennis1987 Linux - General 27 11-18-2010 03:24 PM
When i Write commands in terminal it does nothing Ciaran Linux - Newbie 1 09-29-2010 06:06 PM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 11:34 AM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 07:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 07:53 AM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration