find and replace in multiple files on command line

Vijay picture Vijay · Dec 13, 2009 · Viewed 35.9k times · Source

How do i find and replace a string on command line in multiple files on unix?

Answer

Vijay picture Vijay · Dec 13, 2009

there are many ways .But one of the answers would be:

find . -name '*.html' |xargs perl -pi -e 's/find/replace/g'