#!/usr/local/bin/tcsh -f
##  see if a given computer is dead or not, if alive, 0 else 1 is
##  returned as a return code.
##  usage:  seeifdead  machine
##  the user can check $status.  if 0, machine is alive
##                               if 1, machine is dead.
##   see if machine is dead or unknown
set x=`/etc/ping $1 64 2 | /usr/local/bin/grep "100% packet loss\|unknown host"\
\
`
#echo $x
if( $#x  ) then
#       echo "dead"
        exit 1
else
#       echo "alive"
        exit 0
endif
