replace line in text file code example
Example 1: linux replace string in all files
sed -i 's/old-text/new-text/g' input.txt
Example 2: replace using sed
#on my mac
sed -i -e 's/old-text/new-text/g' text.txt
sed -i 's/old-text/new-text/g' input.txt
#on my mac
sed -i -e 's/old-text/new-text/g' text.txt