Question

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?

Was it helpful?

Solution

sed -i ‘
#      ^ a problem

This is a “smart quote” of sorts, U+2018. Use a regular apostrophe instead, '. Same for the closing quote.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top