On 25/01/2016 00:07, Fernando de Oliveira wrote:
Em 24-01-2016 17:02, [email protected] escreveu:
Author: pierre
Date: Sun Jan 24 12:02:10 2016
New Revision: 16838

+<screen><userinput>sed -e 's@using python[^;]*@&amp;: 
/usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} @'  \
      -i bootstrap.sh</userinput></screen>
<para>
Pierre, this does not work, gives an error:

LANG=C sed -e 's at using python[^;]*@&:
/usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} @'  \
      -i bootstrap.sh
sed: -e expression #1, char 13: unknown option to `s'

Is the following what you really wanted to write?

sed -e '/using python/ s@[^;]*@&:
/usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} @' \
     -i bootstrap.sh


Err no... I really wanted to write what I wrote, and actually, I tested it. When I reported to the book, I forgot to change the & to &amp;, and had to fix that in a second commit, but I doubt it is the problem.
Did you really try

sed -e 's at using python[^;]...' ?

That may explain the error. I wrote s@using... Maybe there is some obfuscation mechanism on your 
computer, changing "s@something" to "s at something"?

OTOH, what you propose should be OK, but could be further simplified to:

sed -e '/using python/ s@;@: 
/usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} @' \
    -i bootstrap.sh

Regards
Pierre

--
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to