diff --git a/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go b/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go index f18819a8c2..14e2eaeb5c 100644 --- a/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go +++ b/dbm-services/redis/db-tools/dbactuator/models/myredis/myredis.go @@ -97,7 +97,7 @@ func GetProxyPasswdFromConfFlie(port int, role string) (password string, err err if err != nil { return } - grepCmd = fmt.Sprintf(`grep -w "password" %s|grep -vE "#"|awk '{print $NF}'`, confFile) + grepCmd = fmt.Sprintf(`grep -w "password" %s|grep -vE "#\s*password" |awk '{print $NF}'`, confFile) } else if role == consts.MetaRolePredixy { confFile, err = GetPredixyLocalConfFile(port) if err != nil {