LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-03-2010, 10:37 PM   #1
devangjani
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
Sending Same Command To all Windows in screen on linux


Hi everyone,
I just have one question that is it possible to send same command at the same time to all windows in screen on Linux.
Please reply with clear example.

Thank You in advance...............
 
Old 03-03-2010, 11:17 PM   #2
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
The man page does not seem to show anything like that. You may want to read it more closely. I just skimmed it.
 
Old 03-03-2010, 11:31 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
You could script it with something like
Code:
for window in "foo bar baz" ; do
   screen -S 12345.pts-1.hal -p $window -X stuff 'somecommand^M'
done
Not sure how you could automatically get the window names for -p. The must be a way though.

Evo2.
 
Old 03-04-2010, 06:01 AM   #4
devangjani
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Hey Thanks $ reply if possible u can read following article.
I read article but not able to understand proper meaning .
Hey if u understand than please explain with proper example..


http://blog.cone.be/2009/11/24/gnu-s...creen-windows/
 
Old 07-05-2010, 12:56 PM   #5
G3n
LQ Newbie
 
Registered: Jul 2010
Location: Belgium
Distribution: Ubuntu, Centos, ..
Posts: 1
Blog Entries: 1

Rep: Reputation: 0
Lightbulb oh my

That article is written as a tutorial. Each article building on the base principles and earlier articles. Also, just to make sure, the article talks about GNU Screen, the terminal multiplexer; check the start of the article for more info about that..

As such it assumes you have an open screen session, with the necessary "screen windows" opened inside. After which you can press "CTRL+a" followed by ":". The command you enter afterwards will be sent to all the windows in that screen session.

Hope this helps.. (and you could've just asked about whatever info you need in the comment section of my article post, Id 've answered you there too )
 
  


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
sending email from LINUX to windows on LAN 24653 Linux - Newbie 1 03-21-2009 08:42 AM
sending messages from linux to windows raja1979 Programming 4 12-21-2005 11:08 PM
How can I go to the windows screen from the command line on suse, on run level 3? abefroman SUSE / openSUSE 1 05-08-2005 07:00 PM
Sending a virus to /mnt/windows via Linux d1l2w3 Linux - Security 7 06-01-2004 04:51 PM
sending windows commands from linux dubman Linux - Networking 1 11-13-2003 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:29 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
Open Source Consulting | Domain Registration