do shell script "
{
echo Network Info for $(hostname):
ping -c300 google.com
ping -c300 yahoo.com
ping -c300 apple.com
echo local ip(s):
ifconfig | awk '/inet /{ip=$2} / active/{print ip}'
echo
echo global ip:
curl -s ifconfig.me
echo
echo name server:
dig +short +identify localhost
echo
} | pbcopy
"
display dialog "Your network information has been copied to your clipboard." buttons {"Ok"} giving up after 20 default button 1
open ipdns2clipboard in the applescript editor