LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 12: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, 03:25 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Dose this page help
 
Old 04-27-2012, 05: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



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 02:24 PM
When i Write commands in terminal it does nothing Ciaran Linux - Newbie 1 09-29-2010 05:06 PM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 06:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:48 AM.

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
Open Source Consulting | Domain Registration