Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'You could do it with style, and run this from geektool...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
You could do it with style, and run this from geektool...
Authored by: blurred on Dec 13, '06 09:52:30PM

Handy for me, (changing networks almost hourly sometimes) to verify connectivity all layers by running this script under geektool, and displaying it on my desktop...

#!/bin/bash
DATE=`date`
GATEWAY=`netstat -nr | grep default |grep -v "#"| awk '{print $2}'`
echo "[*]-- Pinging Default Gateway @ ${DATE}"
echo
if [ "${GATEWAY}" != "" ]
then
ping -c3 ${GATEWAY}

else
echo "[*]-- No Default Gateway Found"
exit 1
fi



[ Reply to This | # ]