shell script to replace a string in a file recursive from a directory code example
Example: linux replace string in files recursively
find . -type f -name "*.txt" -exec sed -i'' -e 's/foo/bar/g' {} +
find . -type f -name "*.txt" -exec sed -i'' -e 's/foo/bar/g' {} +