Replace text into files
To replace text into all the files into one directory you can use the following line of code:
perl -e "s/TEXT_TO_FIND/SUBSTITUTE/g;" $(find . -type f)Alternatively you can use the following script:
for fl in *.php; domv $fl $fl.old
sed 's/TEXT_TO_FIND/SUBSTITUTE/g' $fl.old > $fl
rm -f $fl.old
done