Add basic_search_replace.sh

main
jay 2023-10-19 13:07:26 +00:00
commit a67619298b
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
WPDBPHOST=cat wp-config.php | grep DB_HOST | cut -d \' -f 4
WPDBNAME=cat wp-config.php | grep DB_NAME | cut -d \' -f 4
WPDBUSER=cat wp-config.php | grep DB_USER | cut -d \' -f 4
WPDBPASS=cat wp-config.php | grep DB_PASSWORD | cut -d \' -f 4
keywordSearch=$1
keywordreplace=$2
php srdb.cli.php -h $WPDBPHOST -n $WPDBNAME -u $WPDBUSER -p "$WPDBPASS" -s "$keywordSearch" -r "$keywordreplace"