LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
Member
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS, Ubuntu
Posts: 41

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
Member
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS, Ubuntu
Posts: 41

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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