“Ubuntu Substitua o texto no arquivo” Respostas de código

Ubuntu Substitua o texto no arquivo

sed -i 's/original/new/g' file.txt
Coding Cobra

Linux Substitua a string em todos os arquivos

sed -i 's/old-text/new-text/g' input.txt
Clear Caterpillar

sed substitua no arquivo

sed -i 's/foo/bar/g' hello.txt
Google's Top Recommendation

sed substitua todas as ocorrências?

echo dog dog dos | sed -e 's:dog:log:g'

#You can also use the above answer with appropriate slashes like
echo "grepper is a nice grepper" | sed "s/grepper/blow/g"
Panicky Partridge

Respostas semelhantes a “Ubuntu Substitua o texto no arquivo”

Perguntas semelhantes a “Ubuntu Substitua o texto no arquivo”

Mais respostas relacionadas para “Ubuntu Substitua o texto no arquivo” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código