theIp=""
#1
echo $theIp | while read ip; do
ssh -tt root@$ip
exit
done
#2
while read ip; do
ssh root@$ip
exit
done < <(echo $theIp)
#3
while true; do
ssh root@$theIp
exit
done
the above 3 way about connect any host in a while statement, but only the last one succeeded, why do the first two do nothing?