In English Good morning, I'm having some difficulties with the SED command in OpenBSD when trying to insert a new line of text into a file from a regular expression (regex) when found. I have tried to use all equivalent commands with Linux and GNU and have been unsuccessful. I'm using OpenBSD 6.5 and 6.6
In the example below I can only succeed in replacing a text, this expression is working! However, I would like to know how should I insert a new line of text below the expression "clientenike" without changing this line ??? cd /etc/squid sed -i 's/clientenike/nikevoce.com.br/' /etc/squid/liberados squid -k reco May someone help me? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// In Portuguese - BR Bom dia, estou enfrentando algumas dificuldades com o comando SED ao tentar inserir uma nova linha de texto em um arquivo a partir de uma expressão regular (regex) quando encontrada. Já tentei utilizar todos os comandos equivalentes com Linux e GNU e não obtive sucesso. Estou utilizando o OpenBSD 6.5 e 6.6 No exemplo abaixo consigo obter sucesso apenas para substituição de um texto, esta expressão está funcionando! Entretanto, gostaria de saber como devo fazer para inserir uma nova linha de texto abaixo da expressão "clientenike" sem alterar esta linha??? cd /etc/squid sed -i 's/clientenike/nikevoce.com.br/' /etc/squid/liberados squid -k reco Poderiam por gentileza me ajudar? Atenciosamente, Paulo César Martins MBA - CCAI - ITE - MCP - MCTS email: paulo.mart...@outlook.com<mailto:paulo.mart...@outlook.com> (12) 98826-1621 - TIM