Path: utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!spool.mu.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.protocols.tcp-ip Subject: Re: Testing if a host is up Message-ID: <1991Feb16.041439.1038@Think.COM> Date: 16 Feb 91 04:14:39 GMT References: <529@trux.UUCP> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 18 In article <529@trux.UUCP> car@trux.UUCP (Chris Rende) writes: >I need a way to put a test ahead of the FTP that will determine whether >or not the other host is "up". >Here is what I have so far: ># hostup - Written 01/30/91 by Chris Rende [Script omitted] Except for the exact text of the message printed, the ping command does exactly what your shell script does. It returns 0 status if the host is up, and non-zero when the host is down. This is on SunOS 4.0.3. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar