Re: Bash variable escaping
On 9/11/13, Denis Witt <denis.witt@concepts-and-training.de> 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 ${parameter}" gave me exactly what
> I expect to see ('*').
.. at some point in your script. This is a good starting point.
> Unfortunately when the parameter is passed to the program
Here is where you need to provide more information.
It seems evident that "passing parameter to program" is where you have
a problem. So, you need to show how you are "passing parameter to
program" - how does that look in your script?
> it looks like this (according to "set +x"):
>
> /usr/bin/salt ''\''*'\''' state.highstate -v test=True -b 10
>
> How can I avoid that?
Show us how you're _trying_ to do it currently, then we might be able
to see what you're doing wrong :) :)
Good luck
Zenaan
Reply to: