#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
netstat=$(ping -c3 g.cn|grep transmitted |awk '{print $4}')
if((netstat==0))
#time out
then
date >> network.down.log
else
#ok
echo "network is ok"
fi