I have the following kind of text:
$OU = 'or'; $DINHEIRO_CAIXA = 'Cash balance'; $PAGINA = 'Page'; $DE = 'from'; $ENVIAR = 'Send'; $PRINCIPAL = 'Main';
I've already got all the text within the single quotation marks using
cat arquivo | grep -oP "'[^']+'" | tr -d "'"
This extracted text was then translated to Portuguese, but now I don't know how to replace the original text between single quotation marks with the translated text, I was looking for something like
$OU = 'ou'; $DINHEIRO_CAIXA = 'Dinheiro em caixa'; $PAGINA = 'Pagina'; $DE = 'de'; $ENVIAR = 'enviar'; $PRINCIPAL = 'Principal';
I've tried using
grep -F to replace the file itself, but it failed miserably because the pattern didn't match since I don't have the quotation marks on the new file, is there a way to do this?