Re: Redirecting output on screen command line

Bruno Cudini <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
On Mon, Jul 25, 2011 at 12:25:30PM -0400, Seth Seeger wrote:
> Hello!
> 
> I'm trying to do something like this, where I redirect the output of
> my script into a file:
> 
>    screen -d -m php -f long-runnig-script.php > /tmp/mylogfile.txt
> 
> But of course, the ">" is not passed into screen.  I've tried
> escaping the ">" in all the different ways I could think of, but
> nothing has worked.
> 
> Is there a way to do this?

Hello,

I guess using sh -c '...' should do the trick:
	screen -d -m sh -c 'php -f long-runnig-script.php > /tmp/mylogfile.txt'

-- 
Bruno Cudini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.