Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: R: Re: bash problem in runvdr
On Wed, Apr 09, 2003 at 03:09:36PM +0200, Barbini Uberto wrote:
> > 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=:
>
> So do you need a "dirty hacking" like messing with IFS?
IFS is a official interface (-> man bash) ... why not using it?
>
> And why does it run from bash command line?
I do not understand your question. I've only test this on the
shell prompt and have done a cut&past into the mail. Nevertheless
the IFS interface has to work also in scripts or the shell
program is buggy.
The test above could be simple put into a script:
-------------------------% cut %-------------------------------------
#!/bin/sh -x
VDRPRG="echo"
VDRCMD="$VDRPRG:-Pmp3 -m /video/plugins/mount.sh"
VDRCMD="$VDRCMD:-Pmplayer -m /video/plugins/mount.sh \
-M /video/plugins/mplayer.sh"
OIFS="$IFS"
IFS=:
$VDRCMD
IFS="$OIFS"
-------------------------% cut %-------------------------------------
now add you code, replace `echo' with `vdr', and remove `-x'.
Werner
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index