From d6250457e210697daba3bf0c04d55a5db3882974 Mon Sep 17 00:00:00 2001 From: Kevin Baensch Date: Thu, 17 Nov 2022 15:46:38 +0100 Subject: [PATCH] SQL Proxy: Fix issue with host list --- script/myssh | 4 ++-- script/sqlproxy_cli.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/myssh b/script/myssh index a384122..b2434f0 100755 --- a/script/myssh +++ b/script/myssh @@ -48,7 +48,7 @@ port_forward() { } ls_hosts() { - echo $(ssh -S $HOME/.ssh/controlmasters/%r@%h:%p $SQL_PROXY_HOST ls) + ssh -S $HOME/.ssh/controlmasters/%r@%h:%p $SQL_PROXY_HOST ls } run_client() { @@ -89,7 +89,7 @@ case $MAIN_OPTION in run_client $MYSQL_USERNAME $MYSQL_PASSWORD fi else - echo "Invalid Hostname: $2." + echo "Invalid Hostname: $TARGET_HOST." fi ;; disconnect) diff --git a/script/sqlproxy_cli.sh b/script/sqlproxy_cli.sh index 8ee19da..8d564eb 100755 --- a/script/sqlproxy_cli.sh +++ b/script/sqlproxy_cli.sh @@ -2,7 +2,7 @@ ls_hosts() { # the containers version of grep does not support perl regex so "[^ ]*(?= # Added by hostman)" does not work - echo $(grep -e "# Added by hostman" /etc/hosts | grep -oe "^[^ ]* [^ ]*" | grep -oe "[^ ]*$") + grep -e "# Added by hostman" /etc/hosts | grep -oe "^[^ ]* [^ ]*" | grep -oe "[^ ]*$" } idle() {