in reply to using rsh in a perl script

Hi,
why don't you just first check if the host is up before calling rsh? That way, you don't need a flag as you don't even need to restart your process.
Regards,
svenXY

Replies are listed 'Best First'.
Re^2: using rsh in a perl script
by s_gaurav1091 (Beadle) on Feb 09, 2006 at 10:16 UTC
    Hi thanx for the suggestion but I dont want to log into the remote host and check that whether its up or not.In a way you can say that I am performing some task with my script without logging into the remote host.Is there some command through which I can found that the remote host is up or not?

      But you won't have to log into it to check if the host is up. Your rsh call basically does that and that's not what you want.

      You need to use something like ping to check for a network response before trying to log into the host (via rsh, etc). If pinging the host indicates that it is up then try something like rping to see if the OS is up because I've had many a machine lock up tight yet still respond to pings. This is just an extra measure to ensure that you will get the results you need.