Created
October 21, 2014 13:56
-
-
Save ianchanning/d3576eaeb2e8c952a801 to your computer and use it in GitHub Desktop.
Sed commands to pull out wp-config database constants
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
# taken from jplew's excellent SyncDB | |
# @link https://github.com/jplew/SyncDB/blob/master/syncdb | |
all_db_name=$(sed -n "s/.*DB_NAME', '\([^']*\)'.*/\1/p" wp-config.php) | |
all_db_user=$(sed -n "s/.*DB_USER', '\([^']*\)'.*/\1/p" wp-config.php) | |
all_db_pass=$(sed -n "s/.*DB_PASSWORD', '\([^']*\)'.*/\1/p" wp-config.php) | |
all_db_host=$(sed -n "s/.*DB_HOST', '\([^']*\)'.*/\1/p" wp-config.php) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment