Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

77
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda