📅  最后修改于: 2022-03-11 14:49:41.929000             🧑  作者: Mango
#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/