From a67619298baff1a9fc4af8d26126d5345650cb82 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 19 Oct 2023 13:07:26 +0000 Subject: [PATCH] Add basic_search_replace.sh --- basic_search_replace.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 basic_search_replace.sh diff --git a/basic_search_replace.sh b/basic_search_replace.sh new file mode 100644 index 0000000..6570e5f --- /dev/null +++ b/basic_search_replace.sh @@ -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" \ No newline at end of file