[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen -X scripting behavior
From: |
Trent W. Buck |
Subject: |
Re: screen -X scripting behavior |
Date: |
Thu, 20 Mar 2008 16:57:32 +1100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On Wed, Mar 19, 2008 at 03:27:55PM -0400, Andy Harrison wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I was wondering about this behavior from screen. When I run this
> script, it shows me that screen always thinks it is on window 0, even
> when it has executed the 'other' command and I'm now looking at the
> window I was previously using. Is this expected behavior? If so, is
> there a way to make it behave so that screen will keep track of what
> the currently active window actually is?
>
>
> #!/bin/sh
>
> screen -X echo 'number is...'
> sleep 3
> screen -X number # shows "This is window 0..."
> [...]
Are these sleeps supposed to avoid executing the commands in the wrong
order? Would it be better to simply do a single -X eval:
screen -X eval 'echo "number is..."' number