reinplace

Mark Brethen mark.brethen at gmail.com
Thu Jun 26 20:27:42 PDT 2014


On Jun 26, 2014, at 10:02 PM, Brandon Allbery <allbery.b at gmail.com> wrote:

> On Thu, Jun 26, 2014 at 10:53 PM, Mark Brethen <mark.brethen at gmail.com> wrote:
> I have tried using reinplace to insert a comment in a line but keep getting an error:
> 
>  reinplace  -E "s|^LIBS=\$sim_ac_uniqued_list$|\# LIBS=\$sim_ac_uniqued_list|g" \
>         ${worksrcpath}/configure
> 
> What am I doing wrong?
> 
> Including the error is usually helpful.
> 
> At a guess, though, what you're doing wrong is using double quotes. Tcl is converting \$ to $ and \# to #, then you get a regex error because you have an end anchor not at the end; it may also be trying to expand the $| and failing because it's an illegal Tcl variable name.
> 
> In Tcl, you need to enclose things in braces {...} to protect them from expansion. Otherwise, you'll need extra backslashes (\$ becomes \\\$, \# becomes \\\#, $ becomes \$).
> 
> -- 
> brandon s allbery kf8nh                               sine nomine associates
> allbery.b at gmail.com                                  ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

That was it, the brackets worked! However, I'm still having issues with SoQt.


Mark






More information about the macports-users mailing list