Monthly Archives: November 2017

Sed replace in file

This one liner will replace all occurrences in given file.

sed -i -e 's#https://www.oldurl.xyz/#http://newurl.us#g' dump.sql 

Sed can use for delimiter anything you specify, so in the above example is #(hashtag jajajaj :D)
But it could be comma or whatever fits your case, so this will work too:

sed -i -e 's,https://www.oldurl.xyz/,http://newurl.us,g' dump.sql