[Top][All Lists]

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

Re: Execute script in specific window

From: Geraint Edwards
Subject: Re: Execute script in specific window
Date: Mon, 21 Jan 2008 15:34:39 +0000
User-agent: Mutt/

Peter Rait <address@hidden> said
                (on Mon, Jan 21, 2008 at 03:01:55PM +0100):
>  screen -p $zahl -X eval 'stuff ./" $zahl \015"'
> When looking into the screen window it seems that now only the first 
> part './' is executed without passing the parameter.

This is a quoting problem - single-quotes are not interpolated.

That means:  the argument (to the screen command) that is in '...' will not
be scanned by the shell (script) for variables (etc) - and will appear
empty in this case (since $zahl is not in your environment, perhaps).

You need to do something like the following (to get the variable back out
of the quoting, so that it will be interpolated):

        screen -p $zahl -X eval 'stuff ./" '$zahl' \015"'

or, for more general such scenarios, a more bullet-proof version would be:

        screen -p $zahl -X eval 'stuff ./" '"$zahl"' \015"'

Geraint A. Edwards (aka "Gedge")

reply via email to

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