Re: reinplace first occurrence

2017-08-03 Thread Ryan Schmidt
On Aug 3, 2017, at 15:19, db wrote: > On 3 Aug 2017, at 18:46, Ryan Schmidt wrote: > >> I can't remember anybody asking for this functionality (replace first >> occurrence) before, so that's why there isn't an easy way to do it. > > I needed to add disabled/true to a startup item provided by a

Re: reinplace first occurrence

2017-08-03 Thread db
On 3 Aug 2017, at 18:46, Ryan Schmidt wrote: > You could run a two-command sed manually (with system, not reinplace). Or > maybe you can use awk, or an ed script. This works. Caveat emptor: || (empy RE) doesn't work and range seems to start on first line, not on its

Re: reinplace first occurrence

2017-08-03 Thread Ryan Schmidt
On Aug 3, 2017, at 09:44, db wrote: > > I checked portfile's man page and peaked at the source, but couldn't figure > out yet, why these forms don't work. > > https://stackoverflow.com/a/11458836/2167331 > > In the meantime, I worked around it, but I'd still like to know how to do it. Well

reinplace first occurrence

2017-08-03 Thread db
I checked portfile's man page and peaked at the source, but couldn't figure out yet, why these forms don't work. https://stackoverflow.com/a/11458836/2167331 In the meantime, I worked around it, but I'd still like to know how to do it.