[SPAM] Re: need help with reinplace

Joshua Root jmr at macports.org
Sun Nov 4 06:34:43 UTC 2018


On 2018-11-4 16:26 , Helmut K. C. Tessarek wrote:
> This works perfectly on the commandline without additional escaping:
> 
> cat configure.ac |sed -E "s/AC_INIT\(\[tmux\],
> (next-[0-9]+\.[0-9]+)\)/AC_INIT([tmux], \1 (${version}))/g"
> 
> (with export version=bla)

Yes, because the brackets here don't have to be protected from the
shell. Imagine if the string you wanted to replace contained backticks
or dollar signs instead of brackets.

> But I get your point. There are cases where additional escaping is
> required. Still, IMO this additional escaping makes sense, while in the
> reinplace case it does not. I was trying for hours to correctly escape
> in reinplace.

What about it doesn't make sense to you? We need to understand this in
order to write documentation that explains it well.

- Josh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181104/c9e6fb75/attachment.sig>


More information about the macports-dev mailing list