Mailing List archive

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

[vdr] Re: Starting VDR with given channel number



Christian Jacobsen wrote:
> 
> Hallo,
> 
> > One feature wish (or one more who has not read manuals):
> >
> > It would be nice to be possible to give a channel number as 
> paramater,
> > when starting vdr.
> 
> Use something like this :
> 
> sed 's/CurrentChannel = */CurrentChannel = 4/' \
> /video.developement/setup.conf >/video/setup.conf.NEW
> mv -f /video/setup.conf.NEW /video/setup.conf
> 
> Sets the start chanel to 4 !
> 
> Untested - so please don't hit me if it does not work ;)

*pulling out the big bat* ;)
 
> I am not sure if "*" works as I have not tried it before. 
> Otherwise you will
> have to find the current setting in setup.conf or use something else.

since 'sed' uses regular rexpressions you have to use ".*" rather than
"*"

For greater robustness:

cat /path/to/config/setup.conf |\
 sed "s/^CurrentChannel = .*$/CurrentChannel = 4/" \
 > /path/to/config/setup.conf.new
mv -f /path/to/config/setup.conf.new  \
  /path/to/config/setup.conf

Ciao UloPe



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



Home | Main Index | Thread Index