On 3 Aug 2017, at 18:46, Ryan Schmidt <ryandes...@macports.org> 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 subsequent.

reinplace -E 1,/foo/s|foo|foo\\\n\\\tbar| file

> 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 port's source.

Reply via email to