Hi,

On Fri, Oct 04, 2002 at 12:53:54PM +0200, Tobias Kaefer wrote:
> Bei man ping kann man n�mlich folgendes lesen:
> If ping does not receive any reply packets at all it will exit with code 1.
> On error it exits with code 2. Otherwise it exits with code 0.
> This makes it possible to use the exit code to see if a host is alive or 
> not.
> 
> Wie kann man das abfangen?

ping -c 3 $host || $ppp-restart

oder 

ping -c 3 $host && exit 0
$ppp-restart


bis denn
-- 
May the source be with you!

----------------------------------------------------------------------------
PUG - Penguin User Group Wiesbaden - http://www.pug.org

Antwort per Email an