From owner-freebsd-questions Wed May 30 1:30:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from zeus.dnt.md (dnt.md [195.138.124.37]) by hub.freebsd.org (Postfix) with ESMTP id 88EB537B422 for ; Wed, 30 May 2001 01:30:29 -0700 (PDT) (envelope-from sl@zeus.dnt.md) Received: (from sl@localhost) by zeus.dnt.md (8.11.1/8.11.1) id f4U8UKn75576 for freebsd-questions@freebsd.org; Wed, 30 May 2001 11:30:20 +0300 (EEST) Date: Wed, 30 May 2001 11:30:20 +0300 From: Veaceslav Revutchi To: freebsd-questions@freebsd.org Subject: ping result val. question Message-ID: <20010530113020.A74532@zeus.dnt.md> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi I am confused as to why I get different return values to a ping if run o a command line vs crontab. Here is a small script: #!/bin/sh ping -c 2 somehost.somedomain.com > /dev/null echo $? >> /var/log/ping.log Now if I run it on command line I get a normal result code described in the ping man page and sysexits.h. If I run it from crontab I get a 127 res. val. no matter if the ping was succesful or not. Can someone explain this behaviour please. thanks slava To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message