Answers for "replace text in file ubuntu using sed"

19

sed replace in file

sed -i 's/foo/bar/g' hello.txt
Posted by: Guest on March-01-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 "Shell/Bash"

Browse Popular Code Answers by Language