Category: Linux

If you need to find a string recusively in files and replace with another string. Copy the following script into a file called and run from a Linux prompt:

for file in $(find . -name '*.{FILEEXTENSION}'); do
	sed -e 's/{FIND}/{REPLACE}/' $file > $
	mv $ $file



How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.