标签:telnet
#判断2222端口是否存活
[root@ryzc32 opt]# cat telnet.sh #!/bin/bash JG=`echo -e "\n" | telnet 192.168.1.30 22 | grep Connected | wc -l` if [ "$JG" == 1 ];then echo "0" else echo "1" fi
[root@mndg248 opt]# cat url_mon.sh #!/bin/bash wget -T 10 -c -q --spider www.baidu.com && RETVAL=$? if [ "$RETVAL" == 0 ];then echo "0" else e cho "1" fi
本文出自 “wsyht的博客” 博客,请务必保留此出处http://wsyht2015.blog.51cto.com/9014030/1794584
标签:telnet
原文地址:http://wsyht2015.blog.51cto.com/9014030/1794584