Answers for "sed syntax for replacing strings"

20

replace text with sed

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

replace using sed

#on my mac
sed -i -e 's/old-text/new-text/g' text.txt
Posted by: Guest on November-26-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language