Mailing List archive

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

[vdr] Re: Still problems with command-line



At Sonntag, 14. September 2003 17:26 Rene Bartsch wrote:
> So I want to ask our listies to check my script and tell me WHAT am I
> doing wrong. I've tested quotations and escape sequences for three month,
> now (also troubled by exit-states of su, what I have removed).

Did you try exchange VDR with a script that outputs the _real_ commandline 
args? (e.g. one argument per line to see whether there are breaks). I 
didn't check your full script yet, but when doing on the command-line like 
this:

PLUGIN["1"]="-P\"first --arg\""
PLUGIN["2"]="-P\"second\"
./testscript ${PLUGINS[*]}

I get the following output:
-P"first
--arg"
-P"second"

However, to parse it correctly, the whole -P\"plugin args\" must be _one_ 
argument to vdr. The following gives the desired result for me:

./testscript "${PLUGINS[@]}"

Output:
-P"first --arg"
-P"second"

Note that the subscript is now @ instead of *, _and_ the array is enclosed 
in double quotes. If you only specify @, _without_ the double quotes, the 
result will be a different one.

Greetings,
Sascha


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index