On Sun, Oct 22, 2006 at 10:52:16PM +0000, Thorsten Glaser wrote:
> With ed, it looks like follows:
> cp .config .config.old
> ed -s .config <<EOF
> /# FWRT_FOO/s/^# \(.*\)$/\1=y/
> /FWRT_BAR/s/^/# /
> ...
> wq
> EOF

Shouldn't it be:

cp .config .config.old
ed -s .config <<EOF
/# FWRT_FOO/s/^# \(.*\) is.*/\1=y/
/FWRT_BAR/s/\(.*\)=.*/# \1 is not set/
...
wq
EOF

this should better match the config syntax. What about an outdated
config not containing the options at all? Is it possible with `ed' to
insert text in case of failing searches?

Greetings, Phil

_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to