Answers for "ubuntu replace text in file"

8

ubuntu replace text in file

sed -i 's/original/new/g' file.txt
Posted by: Guest on March-16-2020
13

linux replace string in all files

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

sed replace in file

sed -i 's/foo/bar/g' hello.txt
Posted by: Guest on March-01-2020
2

sed replace all occurances?

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"
Posted by: Guest on June-17-2020

Code answers related to "ubuntu replace text in file"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language