Thursday, March 1, 2012

Recursive find and replace in files

If you need to make a change in all your OSB artifacts:

copy the sbconfig.jar in an empty folder
jar xvf sbconfig.jar
rm sbconfig.jar

perl -p -i -e 's/originalString/targetString/g' `find . -name '*' -type f`

jar cvf sbconfig.jar

done


if originalString contains / (like /bla/bly ) you can do this: \/bla\/bly

No comments: