reinplace first occurrence
Ryan Schmidt
ryandesign at macports.org
Thu Aug 3 16:46:47 UTC 2017
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 the stack overflow answer says non-GNU sed doesn't support the single-command version, and needs a two-command version. reinplace doesn't support executing multiple commands.
You could run a two-command sed manually (with system, not reinplace). Or maybe you can use awk, or an ed script.
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.
More information about the macports-dev
mailing list