LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-22-2007, 01:53 PM   #1
Ghostwheel
LQ Newbie
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS
Posts: 28

Rep: Reputation: 0
Question Pushing a LF to a screen


History: I am running a BF2 server and would like to be able to start/stop the server with cron.

I run the bf2 server in a screen. I have found commands to push commands to a screen (-X stuff <command>) but it doesn't perform a LF after. Example: I am able to push an "exit" to the screen but it doesn't cause the screen to end, when I manually reattach there is an "exit" sitting at the prompt.
 
Old 02-22-2007, 02:12 PM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by Ghostwheel
History: I am running a BF2 server and would like to be able to start/stop the server with cron.

I run the bf2 server in a screen. I have found commands to push commands to a screen (-X stuff <command>) but it doesn't perform a LF after. Example: I am able to push an "exit" to the screen but it doesn't cause the screen to end, when I manually reattach there is an "exit" sitting at the prompt.
I know this may sound too simple, but have you tried quoting your <command> string and following it with a \n?

Danny
 
Old 02-26-2007, 09:29 AM   #3
Ghostwheel
LQ Newbie
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS
Posts: 28

Original Poster
Rep: Reputation: 0
Just tried it. Didn't work

I also tried just adding a \n after the exit, still no joy
 
Old 03-05-2007, 10:45 AM   #4
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Ghostwheel, did you get anywhere with this? I will investigate further tonight - it seems to obvious a thing to want to do for it not to be usable.

What did the \n do? Hopefully you did not see '\''n' appended to the command. Alternatively (the other end of the escaping system), you might need to escape it further with \\n.
 
  


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
pushing a shell in FC6 mrurmil Linux - Security 5 02-16-2007 08:33 AM
Pushing the desktop tkrin Linux - Networking 12 12-21-2005 09:55 PM
Pushing logs on a network af_dave Linux - Networking 1 07-25-2004 08:42 PM
touble installing linux 8.2, blank screen after pushing install doppelmord Linux - Software 1 12-26-2003 09:29 PM
pushing applications edrabs Linux - Software 1 11-26-2003 02:13 AM


All times are GMT -5. The time now is 03:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration