[SOLVED] Syntax Question

Hi There,

I want to run a shell script with a Variable.

executeCommandLine("./myscript.sh" +theVariable)

does not work. I guess it’s a simple thing with quotations, but can’t figure it our by myself.

Any hint is appreciated.

Thanks -Michael

Google is you friend

And can you post the complete rule you are trying to use, please?
What is theVariable?

Hi Michael,

maybe this post from @rlkoshak can help you to find a solution.

Depending on the content of theVariable, you might need to add a space after .sh:

executeCommandLine("./myscript.sh " +theVariable)
1 Like

the Variable is an itemState as String

var theVariable = myItem.state.ToString

the shell script is working if I pass a variable in Terminal everything runs fine

That simple space did the Trick…
Thanks!