ping -c 2 host_name if [ $? !=0]; then echo "Not ping!" else echo "Work normal" fi
p.s.
if ping -q -c 2 $HOST; then echo "ping OK" else echo "ping BAD" fi