find . -iname ‘*php’ | xargs grep ‘search-string’ -sl | while read x; do echo $x; sed -i ‘s/search-string/replace-string/’ $x; done
php find and replace string
Leave a reply
find . -iname ‘*php’ | xargs grep ‘search-string’ -sl | while read x; do echo $x; sed -i ‘s/search-string/replace-string/’ $x; done