运维网's Archiver
论坛
›
Shell/Powershell
› shell 用telnet检查服务端口是否打开 【高效】
???紵
发表于 2018-8-28 12:39:39
shell 用telnet检查服务端口是否打开 【高效】
# cat checksbc1.sh
#!/bin/bash
nport=`echo ""|telnet 10.134.41.1 23 2>/dev/null|grep "\^]"|wc -l`
if [ "$nport" -eq "0" ];then
mail -s 'xxxxxx' xxxxxxx@163.com < /home/sbclog/sx30001/check.txt
fi
页:
[1]
查看完整版本:
shell 用telnet检查服务端口是否打开 【高效】