[openbox] command contains $ and &

Dana Jansens dana at orodu.net
Wed Dec 15 15:08:17 EST 2010


On Tue, Dec 14, 2010 at 3:11 PM, Jonas J Linde <jonas at init.se> wrote:
> And Johan Vromans spoke unto the world. And said:
>>Jonas J Linde <jonas at init.se> writes:
>>>>2. command contains &
>>>><action name="Execute">
>>>>    <command>rdesktop xxx.xxx.xxx.xxx -u administrator -p xxxx&xxxx</
>>>>command>
>>>></action>
>>>
>>> And I'd use the same trick for that.
>>
>>Why? I see no reason why
>>
>>  <command>rdesktop xxx.xxx.xxx.xxx -u administrator -p xxxx&amp;xxxx</command>
>>
>>should not work (It doesn't, since it leaves &amp; in the command
>>instead of substituting a & . However, using a single & makes the XML
>>parser barf.)
>
> Hi again!
>
> I was a bit sloppy in my previous comment but the construction
>
>  <action name="Execute"><command>sh -c "command1&amp;command2"</command></action>
>
> works perfectly although the same thing can be done with
>
>  <action name="Execute"><command>command1</command></action>
>  <action name="Execute"><command>command2</command></action>
>
> But sometimes you might want to do something like
>
>  <action name="Execute"><command>sh -c "command1&amp;&amp;command2"</command></action>

Does this work?

<action name="Execute"><command>sh -c
&quot;command1&amp;&amp;command2&quot;</command></action>

> which I don't know any alternative for - except creating a shell
> script to run instead of the combined commands.
>
> Cheers!
> --
> Jonas J Linde <jonas at init.se>   http://jonas.init.se/   +46-707-492496
> <-------------------------------------------------------------------->
> GE/IT$ d-(+) s++: a+ C++(++++)$ UBVL++(++++)$ P+++ L+++$ E++ W++(-) N+
> o-- K+ !w(+) O M@ V PS+ PE++(-) Y+ PGP+(++) t 5 X R-(+) tv--  b+>++ DI
> D++ G+(-) e+++ h---- r++ y++++ UF+
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>


More information about the openbox mailing list