1

When I do:

sed 's/@driver.quit/#@driver.quit' set_QA_district_name_spec.rb 

I get the error shown in the title.

How can I get around this error, what is wrong?

5

The substitute expression was missing the end slash, e.g.

sed 's/@driver.quit/#@driver.quit' set_QA_district_name_spec.rb 

should be

sed 's/@driver\.quit/#@driver.quit/' set_QA_district_name_spec.rb 

Once it worked I added the -i ('in-place') flag so the file itself was actually replaced, e.g.

sed -i 's/@driver\.quit/#@driver.quit/' set_QA_district_name_spec.rb 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.