screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I execute a command in a detached screen?


From: Jean-Philippe Gois
Subject: Re: How can I execute a command in a detached screen?
Date: Mon, 21 Aug 2006 10:37:36 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060728)

Jim C. wrote:
I do the following:

address@hidden bin]$ screen -dm
address@hidden bin]$ screen -ls
There is a screen on:
        22539..mirage   (Detached)
1 Socket in /tmp/uscreens/S-sdn20.

address@hidden bin]$ screen -S 22539..mirage -X exec "/bin/ls -l"
address@hidden bin]$

...but when I re-attach the screen there is no evidence to show that the
command executed.
I've been pouring over the man pages and I cannot discern the proper
syntax for this.

Clue please?
Executing in a screen means executing a screen command, not a shell command.
Here, it seems that you want screen to run a shell command in a new window.
So what you have to do is :

screen -S 22539..mirage -X screen watch /bin/ls -l


HTH
Flupke

--
<< There's no place like ~! >>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]