Recently, I needed to change a link on multiple pages of a website. After a little trial and error, the best way to do this is using perl on the command line:
perl -p -i -e 's/original text/new text/g' *.htm
Just make sure to escape special characters!
perl -p -i -e 's/http:\/\/www.abc.com/http:\/\/newsite.com/g' *.htm