sed updating URL inside php

If I have to update a lot of php files to correct a URL. I use the following sed command

for i in ./*.php;

do

sed “s/https\:\/\/www.mattpallotta.com\/home\//https\:\/\/www.mattpallotta.com\//g” $i > $i-new;

mv $i-new $i;

done;

This works out well for me.
VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
This entry was posted in Life in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>