Tuesday, December 19, 2006

Search and Replace Recursively with Bash

All one line!

find ./*.html -type f -exec sed - i 's/TextToReplace/ReplacementText/' {} \;

1 comment:

Patricio said...

This command was very ussefull, but you have a typo:

find ./*.html -type f -exec sed -i 's/TextToReplace/ReplacementText/' {} \;

cheers!