Thanks guys...I finally find out the problem is due to the ssh2 remote call. The ssh2 call to a host and execute a shell command. The above original script will exit the outter loop upon the first execution. I am still looking into why.
In addition to the above situation, how could I control the following case.
read /etc/passwd
while
do something
read in a tmp.file
while
do something else
done < tmp.file
done </etc/passwd
the outter loop stopped without reading in the second line and so on from /etc/passwd file
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.