Quantcast
Channel: Zimbra Forums
Viewing all articles
Browse latest Browse all 139

Developers • Re: [SOLVED] Scripting service monitoring

0
0
uxbod wrote:
#!/bin/bash
OIFS=${IFS}

IFS=$'
'
running=($(su - zimbra -c "zmcontrol status"| grep Running | awk '{ print $1 }'))

arrayLen=${#running[@]}

echo "Number of elements : ${arrayLen}"
for (( i=0; i
do

echo "${running[$i]}"

done
IFS=${OIFS}



###################

I used above script but after run it I am getting error like this

Number of elements : 15
test.sh: line 11: unexpected EOF while looking for matching `)'
test.sh: line 18: syntax error: unexpected end of file

Statistics: Posted by vijendra — Thu Aug 26, 2021 1:42 pm



Viewing all articles
Browse latest Browse all 139

Latest Images

Trending Articles





Latest Images