批量测试网络关系的小脚本
#!/bin/sh
touch telnetRes.log
for ip in `cat $1`
do
format=`echo $ip|awk -F ':' '{print $1,$2}'`
{ echo "quit";sleep 1; }|telnet $format >> telnetRes.log
#echo $format
done
#!/bin/sh
touch telnetRes.log
for ip in `cat $1`
do
format=`echo $ip|awk -F ':' '{print $1,$2}'`
{ echo "quit";sleep 1; }|telnet $format >> telnetRes.log
#echo $format
done