sed to find and replace a pattern code example
Example 1: sed replace in file
sed -i 's/foo/bar/g' hello.txt
Example 2: bash find and replace all files with specifc name with another file
find . -name "boom.txt" -exec cp ~/replace.txt {} \;
sed -i 's/foo/bar/g' hello.txt
find . -name "boom.txt" -exec cp ~/replace.txt {} \;