From b6d5e065470bfa702e3e5774eb5cd11aa26ee771 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 6 Jan 2024 23:31:38 -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 c7a8685..252f7cd 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -113,7 +113,7 @@ CHECK(){ fi MSG="Determining hosts and preparing" - c=0; cw=${C_CW}; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + c=0; cw=${C_CW}; spc=''; spc1=$(expr ${cw} - ${#MSG}); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done echo -en "${idsCL[LightCyan]}${MSG}${spc}: " while read hostid hostname hostip hostlimits; do if [ "$hostid" != "id" ]; then @@ -131,7 +131,7 @@ CHECK(){ echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" MSG="Starting jobs to collect host info" - c=0; cw=${C_CW}; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + c=0; cw=${C_CW}; spc=''; spc1=$(expr ${cw} - ${#MSG}); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done echo -en "${idsCL[LightCyan]}${MSG}${spc}: " #for hostid in "${!host_ip[@]}"; do for hostname in "${hostnames_sort[@]}"; do