Am 25.01.2010 00:19, schrieb Adrian C.:
> Now I want a variable or array at the top of the script so I could
> easily add, remove and comment plugins... rewriting the above example:
> vdrplug=(-Pfemon
>          -P"softdevice -vo xv:full -ao alsa:mixer:pcm=default"
> )
> $vdrbin -L $vdrlib ${vdrpl...@]}

The correct way to place every array element as one parameter, without
doing any additional whitespace separation, is this:

"$vdrbin" -L "$vdrlib" "${vdrpl...@]}"

In contrast, "${vdrplug[*]}" merges all to one parameter, ${vdrpl...@]}
does another whitespace separation run.

runvdr extreme also uses a bash array for building the command line.



vdr mailing list

Reply via email to