sed -i ‘
# ^ a problem
This is a “smart quote” of sorts, U+2018. Use a regular apostrophe instead, '
. Same for the closing quote.
質問
I'm attempting to run this command:
sed -i ‘s/if (DEFINED CMAKE_TOOLCHAIN_FILE)/if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)/g’ makefiles/cmake/arm-linux.cmake
But it seems my bash syntax is messed up when I copy that snippet from http://thinkrpi.wordpress.com/2013/05/22/opencvpi-cam-step-2-compilation/ and I get this:
-bash: syntax error near unexpected token `('
Any idea why?
解決
sed -i ‘
# ^ a problem
This is a “smart quote” of sorts, U+2018. Use a regular apostrophe instead, '
. Same for the closing quote.