📌  相关文章
📜  linux 替换字符串 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:41.929000             🧑  作者: Mango

代码示例2
#replace all string occurence
sed -i 's/old-text/new-text/g' input.txt 

#replace all string occurence and create new file
sed -i 's/old-text/new-text/g' input.txt > newfile.txt

#see link 
#https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/