From ef3da3f3dd7aefb68fc77b51dca90ee1ac269185 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 2 Jan 2023 09:22:23 -0600 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index c03c2d4..aca0fe7 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -98,12 +98,12 @@ CHECK(){ fi done <<< $(MYSQL_PWD="sysmoninsert" mysql -h mysqldb.scity.us -P 3306 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts") - IFS=$'\n' sorted=($(sort <<<"${hostnames_sort[*]}")) + IFS=$'\n' hostnames_sort=($(sort <<<"${hostnames_sort[*]}")) unset IFS for x in "${!hostnames[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames[$x]}" ; done echo - for x in "${!sorted[@]}"; do printf "[%s]=%s\n" "$x" "${sorted[$x]}" ; done + for x in "${!hostnames_sort[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames_sort[$x]}" ; done # for hostid in "${!host_ip[@]}"; do