COUNT= nmap 172.30.167.74 | grep -c 23
if [ $COUNT ="1" ]; then
echo "Action A"
else
echo "Action B"
fi
output if matched with the grep or not always picks the same statment friend mentioned this to be the cure but i am unable to work this one out aswell
COUNT=`yourcmd | grep -c Cisco'
if [ $COUNT -ge 1 ]; then
echo "Action A"
else
echo "Action B"
fi
where am i going wrong
if [ $COUNT ="1" ]; then
echo "Action A"
else
echo "Action B"
fi
output if matched with the grep or not always picks the same statment friend mentioned this to be the cure but i am unable to work this one out aswell
COUNT=`yourcmd | grep -c Cisco'
if [ $COUNT -ge 1 ]; then
echo "Action A"
else
echo "Action B"
fi
where am i going wrong