From owner-freebsd-bugs Sun May 26 17:21:55 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from tensor.xs4all.nl (tensor.xs4all.nl [213.84.53.200]) by hub.freebsd.org (Postfix) with ESMTP id B96C237B405 for ; Sun, 26 May 2002 17:21:52 -0700 (PDT) Received: from kilgore.xs4all.nl (kilgore.xs4all.nl [192.168.1.3]) by tensor.xs4all.nl (Postfix) with ESMTP id 777915626; Mon, 27 May 2002 02:21:50 +0200 (CEST) Date: Mon, 27 May 2002 02:21:48 +0200 From: Dimitry Andric X-Mailer: The Bat! (v1.60m) Business Reply-To: Dimitry Andric X-Priority: 3 (Normal) Message-ID: <5142218396.20020527022148@xs4all.nl> To: Dima Dorfman Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/38573: ping -o option (exit after one reply) In-Reply-To: <200205262310.g4QNA3154111@freefall.freebsd.org> References: <200205262310.g4QNA3154111@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2002-05-27 at 01:10:03 Dima Dorfman wrote: DD> David Taylor wrote: DD> > ping -o will exit after receiving a single reply packet, which is useful DD> > for trying to see if a host/link is alive at all (which is what the script DD> > was attempting to to do :). DD> Isn't this the same as `ping -c 1`? I think the -o switch is meant to complement the -c switch, as in: ping -c 10 -o example.com This will try to ping 10 times, but it exits (with status 0) as soon as any reply is returned, instead of always finishing all 10 pings. Cheers, -- Dimitry Andric PGP Key: http://www.xs4all.nl/~dim/dim.asc Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3 Lbh ner abj va ivbyngvba bs gur QZPN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message