if you want to Search for a particular string or text and replace it with a new value in files in Sub directories of a folder than it can be easily achieved using sed , you do not need to use any lengthy script to perform this simple search and replace task in a folder and all its child directories

simply use change to that directory and issue the following command, of-course change the replacement text according to your needs

.
.
.
.
find ./ -type f -exec sed -i 's/toreplace/replacedtext/g' {} \;

Trackback

no comment untill now

Add your comment now