Page 1 of 1

Find and replace a string in multiple files

Posted: Sun Apr 06, 2014 9:56 pm
by fabiodelorenzo
looking for to_be_replaced
replacing with new_string
for *.html files only :

Code: Select all

find . -type f -print0 | xargs -0 sed -i 's/to_be_replaced/new_string/g' *.html