Search and Replace Strings in Files Under a Certain Directory
As simple as:
$ find thePath -type f -name theFileNamePattern |xargs \ perl -e "s/toBeReplacedString/newString/g" -pi