- Find all files on containing STRING_AAAA and replace it by STRING_BBBB in place (directly in the file).
find . -type f -exec grep -l STRING_AAAA {} \; -exec perl -pi -e 's!STRING_AAAA!STRING_BBBB!g' {} \;Pre-tests :
- Find all files on containing STRING_AAAA.
find . -type f -exec grep -l STRING_AAAA {} \;