Last active
December 2, 2019 14:14
-
-
Save w-jerome/aec50a9b247c8e18141ec48a9334d42d to your computer and use it in GitHub Desktop.
Terminal - Search and replace (sql url domaine replace)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "www." to "local." | |
sed 's/www.mysite.fr/local.mysite.fr/g' mysql.sql > mysql-new.sql | |
# HTTPS to HTTP | |
sed 's/https:\/\/www.mysite.fr/http:\/\/www.mysite.fr/g' mysql.sql > mysql-new.sql | |
# If bug "sed: RE error: illegal byte sequence" | |
LC_CTYPE=C sed 's/www.mysite.fr/local.mysite.fr/g' mysql.sql > mysql-new.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment