When i run the below command i get the output, however it throws
command not found
error. I have no idea why this error appears. Any suggestions?
val1 = ps -ef|grep -i active | wc -l
val2 = 2
echo $val1
if [$val1 -ge $val2] ; then
echo "Active MQ process is Running on $HOSTNAME and the process total $(netstat -a | grep 61614 | wc -l)"
else
echo "Active MQ process appears DOWN $HOSTNAM"
fi
Output below,
bash-4.1# ./testact.sh
./testact.sh: line 4: val1: command not found
0
./testact.sh: line 5: val2: command not found
Active MQ process is Running on r00du3n0c and the process total 524
bash-4.1#