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 11-05-2015, 01:50 AM   #1
sleftar
Member
 
Registered: Sep 2015
Posts: 51

Rep: Reputation: Disabled
Sending parameter to screen


Hi guys,

I am trying to make an automated message for my game server running in linux.. Ubuntu 14.

I know how to send a message to screen

Code:
screen -S screenname -X stuff 'ls -l^M'
How to send a parameter to screen.
For example if

Quote:
a="ls -l"
screen -S screenname -X stuff '$a^M'
This does not send parameter a to screen. Do you know how I can do it?
 
Old 11-05-2015, 02:00 AM   #2
sleftar
Member
 
Registered: Sep 2015
Posts: 51

Original Poster
Rep: Reputation: Disabled
Nevermind I solved it it should be like

Quote:
a="ls -l"
screen -S screenname -X stuff $a^M
without quotes.

It was like this

Quote:
screen -S screenname -X stuff '$a^M'

Last edited by sleftar; 11-05-2015 at 02:02 AM.
 
  


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 a random message to screen sleftar Linux - Newbie 8 11-05-2015 09:36 AM
Kernel shows black screen if “vga” parameter was passed fargred Linux - General 2 05-22-2014 09:47 AM
[SOLVED] sending commands to a screen fatalerror0x00 Slackware 7 10-31-2012 01:47 PM
linux bash - how to use a dynamic parameter in shell parameter expansion expression nickleus Linux - General 2 08-21-2006 04:54 AM
sending parameter to kernel vishalbutte Programming 3 01-16-2006 02:39 AM

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

All times are GMT -5. The time now is 05:51 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