Answers for "find and replace texts in a file using sed"

20

replace text with sed

sed -i 's/old-text/new-text/g' input.txt
Posted by: Guest on March-31-2020
0

sed replace into new file

You can try this sed command

sed 's/,\(.*china\)/,Tomas_proxy.lt\/\1/' FileName
or

sed 's/,\(.*china\)/,Tomas_proxy.lt\/\1/' FileName > NewFile
or

sed  -i.bak 's/,\(.*china\)/,Tomas_proxy.lt\/\1/' FileName
Posted by: Guest on April-20-2022

Code answers related to "find and replace texts in a file using sed"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language