Andrew Benton wrote:

> I've figured it out in the bath. 

LOL.

> 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#' {} \;

Now that's interesting.  Looking at the source, I now remember that the 
-i option can take an optional backup value.  When using -ir, sed is 
interpreting the r as the extension for the backup and not as an option.

When I use sed -ri ..., it works also.

This has been an intriguing problem.   I think the issue comes up with 
the tar -cf option also.

Thanks for figuring it out.

   -- Bruce




-- 
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