为什么下面的代码只运行一次?
while read -r p q; do
echo "$p + $q"
ssh -q user@hostname "/tmp/telnet $p $q" >> /tmp/out
grep -i refused /tmp/out
if [ $? != 0 ]; then
echo "$i: telnet : connect to addreess $p on $q: Connection successful."
fi
rm /tmp/out
done < list
列表具有以下内容
server1 80
server2 443