On Mon, 12 Dec 2011 19:17:29 -0600
Bruce Dubbs <[email protected]> wrote:

> I think I made an error.  What my script has is:
> 
>   find -name Makefile -exec                                 \
>          sed -ir -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1'    \
>                  -e 's#BUILD_ARCHIVE :*= 1#NO_&#'           \
>                  -e '/^USEDLIBS/s# \([A-Za-z]*\).a# -l\1#g' \
>                  -e 's#^USEDLIBS#LDFLAGS#' {} \;
> 
> The parens should be escaped.  That didn't make it into the book.

I've figured it out in the bath. the -i and the -r need to be separated.
This works without the brackets escaped:

find -name Makefile -exec                                  \
      sed -i -r -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1'    \
                -e 's#BUILD_ARCHIVE :*= 1#NO_&#'           \
                -e '/^USEDLIBS/s# ([A-Za-z]*).a# -l\1#g' \
                -e 's#^USEDLIBS#LDFLAGS#' {} \;

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to