php find and replace string

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

Leave a Reply

Your email address will not be published. Required fields are marked *