Mailing List archive

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

[vdr] Re: bash problem in runvdr



On Wed, Apr 09, 2003 at 02:31:57PM +0200, I've wrote:
> 
> First try:
> 
> sh-2.05b> VDRPRG="echo"
> sh-2.05b> VDRCMD="$VDRPRG:-Pmp3 -m /video/plugins/mount.sh"
> sh-2.05b> VDRCMD="$VDRCMD:-Pmplayer -m /video/plugins/mount.sh -M /video/plugins/mplayer.sh"
> sh-2.05b> OIFS="$IFS"
> sh-2.05b> IFS=:
> sh-2.05b> set -x
> sh-2.05b> $VDRCMD > /dev/null
> + echo '-Pmp3 -m /video/plugins/mount.sh' '-Pmplayer -m /video/plugins/mount.sh -M /video/plugins/mplayer.sh'
> sh-2.05b> set +x
> + set +x
> 
> ... seems to work.  Maybe a space between -P and the plugin is nice to have.
> This will be done by
> 
> sh-2.05b> VDRPRG="echo"
> sh-2.05b> VDRCMD="$VDRPRG:-P:mp3 -m /video/plugins/mount.sh"
> sh-2.05b> VDRCMD="$VDRCMD:-P:mplayer -m /video/plugins/mount.sh -M /video/plugins/mplayer.sh"
> sh-2.05b> OIFS="$IFS"
> sh-2.05b> IFS=:
> sh-2.05b> set -x
> sh-2.05b> $VDRCMD > /dev/null
> + echo -P 'mp3 -m /video/plugins/mount.sh' -P 'mplayer -m /video/plugins/mount.sh -M /video/plugins/mplayer.sh'
> sh-2.05b> set +x
> + set +x
> 
> 
> ... with `echo' it works on the bash prompt (called as sh for bourne shell compatiblity) as seen on the
> terminal copy I have put here.  Maybe this will also work in the runvdr script.
> 

Don't forget to reset the IFS after calling vdr with:

      IFS="$OIFS"

or all other expansion will be affected afterwards :^)


     Werner


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



Home | Main Index | Thread Index