From 0d1626b5a1bddf3a4cba00ff8944c60716a62df6 Mon Sep 17 00:00:00 2001 From: jd4u Date: Mon, 2 Jan 2023 03:40:13 +0530 Subject: [PATCH 1/2] Fix for command format AUTH [username] [password] Usage: -a "username password" or -a "password" or -a password Removed double quotes to support passing username argument along with password --- redis-bash-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis-bash-cli b/redis-bash-cli index de0e9d9..30f53fa 100755 --- a/redis-bash-cli +++ b/redis-bash-cli @@ -36,7 +36,7 @@ else echo "Wrong arguments" exit 255 fi -[ "${AUTH}" != "" ] && redis-client 6 AUTH "$AUTH" > /dev/null +[ "${AUTH}" != "" ] && redis-client 6 AUTH $AUTH > /dev/null [ "${REDISDB}" != "" ] && redis-client 6 SELECT "$REDISDB" > /dev/null for ((z=1;z<=${REPEAT};z++)) do From 705ae62c400db6a2303bcc46b8cb6bf8edda715e Mon Sep 17 00:00:00 2001 From: jd4u Date: Mon, 2 Jan 2023 03:52:12 +0530 Subject: [PATCH 2/2] Doc the command format AUTH [username] [password] Parameters list updated for the optional format to supported username and password --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4b45435..56e5394 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Parameters: -n DB - Select the database DB. -r N - Repeat command N times. -a PASSWORD - Authentication password + OR -a "USERNAME PASSWORD" - Authentication username & password in double quotes -i INTERVAL - Interval between commands ```