Re: Bash variable escaping

2013-09-11 Thread Denis Witt
On Wed, 11 Sep 2013 11:37:55 +0200 Vincent Zweije wrote: > All these will pass the single quotes to salt which is wrong. #3 also > misses the closing double quote. My mistake, when I put it together in the mail. > || machines='*' > || salt $machines > || salt ${machines} > || salt "${machin

Re: Bash variable escaping

2013-09-11 Thread Vincent Zweije
On Wed, Sep 11, 2013 at 10:46:38AM +0200, Denis Witt wrote: || I expect the program (salt) to see exactly '*' (single quote, asterisk, || single quote). You may expect so, but salt does not. || See examples of the salt-syntax here: || http://docs.saltstack.com/topics/targeting/globbing.html

Re: Bash variable escaping

2013-09-11 Thread Denis Witt
On Tue, 10 Sep 2013 22:22:06 +0100 Chris Davies wrote: > Do you expect the program to see the asterisk character itself, or an > expansion into the corresponding list of files in the current folder? Hi, I expect the program (salt) to see exactly '*' (single quote, asterisk, single quote). See

Re: Bash variable escaping

2013-09-10 Thread Zenaan Harkness
On 9/11/13, Denis Witt wrote: > I've a problem with a script. It's a wrapper for a program which uses > for example '*' as a parameter. It could also be 'foobar*' and I want > the script user to type in the desired parameter via "dialog > --inputbox". > > The parameter is set correctly: "echo ${pa

Re: Bash variable escaping

2013-09-10 Thread Chris Davies
Denis Witt wrote: > I've a problem with a script. It's a wrapper for a program which uses > for example '*' as a parameter. It could also be 'foobar*' [...] Do you expect the program to see the asterisk character itself, or an expansion into the corresponding list of files in the current folder?

Re: Bash variable escaping

2013-09-10 Thread Denis Witt
On Wed, 11 Sep 2013 01:44:33 +1000 Zenaan Harkness wrote: > Show us how you're _trying_ to do it currently, then we might be able > to see what you're doing wrong :) :) Hi, here's the relevant part of the script: machines=$(dialog --inputbox "Choose the minions:" 10 50 "'*'" 3>&1 1>&2 2>&3) di

Re: Bash variable escaping

2013-09-10 Thread Vincent Zweije
On Tue, Sep 10, 2013 at 05:13:01PM +0200, Denis Witt wrote: || I've a problem with a script. It's a wrapper for a program which uses || for example '*' as a parameter. It could also be 'foobar*' and I want || the script user to type in the desired parameter via "dialog || --inputbox". || ||

Bash variable escaping

2013-09-10 Thread Denis Witt
Hi List, I've a problem with a script. It's a wrapper for a program which uses for example '*' as a parameter. It could also be 'foobar*' and I want the script user to type in the desired parameter via "dialog --inputbox". The parameter is set correctly: "echo ${parameter}" gave me exactly what I