check_vmtools.sh

#/bin/bash
vm_tools_version='11.3.5.31214'

for i in $(cat vmtools.ip.txt)
do
vmtools_v=`ssh root@$i vmtoolsd -v | awk {'print $5'}`

if [[ $vm_tools_version == $vmtools_v ]] ; then

echo $i >> vmversion11.txt

else

echo $i >> vmversion.txt
fi
done

posted @ 2022-11-02 09:06  繁星下的晴空  阅读(25)  评论(0编辑  收藏  举报