example search replace
grep "loft_categories" *.java|awk -F":" '{print "replace.sh \"loft_categories\" \"space_categories\" "$1 }'|uniq|/bin/sh
(below example looks at current path maxdepth of 4 for anything called .java
runs a search and replace on the files for value to value 2
for file in $(find . -maxdepth 4 -name \*.java -print); do
echo "Searhing : $file;
replace.sh "pattern1" "pattern2" $file
done
or using -exec
find . -type f -exec replace.sh "abc123" "ccc123" {} \;
find . -type f -name something.\* -exec replace.sh "abc123" "ccc123" {} \;
find . -type f -name \*.java -exec replace.sh "abc123" "ccc123" {} \;