
Originally Posted by
jacorobo
Hi all,
I've a problem concerning a "network" of ftp servers to which I have to connect one after the other. The problem consists in the reply from not available servers that hangs without response (no messages such as "Connection refused" or "Destionation unreachable").
Do you know any commands to manage ftp replies or to test ftp connection before it hangs??
Thank you for your attention.
Jacorobo
There are a lot of possibilities. One example would be to write a shell script which pings the server, before you attempt to log into it. Perhaps something like
Code:
for i in server1 server2 do
ping -c1 $i >/dev/null 2>/dev/null
if [ $? = 0 ]; then
ftp $i < somescript
fi
done
Bookmarks