Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

76
Views
Uncomment line using sed

How can I uncomment a line // Configure::write('debug', 2); using sed? I've tried

sed 's+// Configure::write('debug', 2);+Configure::write('debug', 2);+g' -I file
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The problem is you are using single quotes both to denote the argument and you have them inside the string you are trying to match, so the shell just strips them, and the match fails.

Use double quotes around the argument:

sed "s+// Configure::write('debug', 2);+Configure::write('debug', 2);+g" -i file

Note that depending on the version of sed you are using, you may need to escape the parentheses so they are not treated as a capture group.

I tested with GNU sed version 4.7 and it is not needed, the example above works, but it also expects a lower case i as the "in place" parameter.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!