Skip to content

Instantly share code, notes, and snippets.

@evgeny-goldin
Created April 21, 2014 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgeny-goldin/11144260 to your computer and use it in GitHub Desktop.
Save evgeny-goldin/11144260 to your computer and use it in GitHub Desktop.
#!/bin/bash
myip=$(curl http://www.wheremyipaddress.com/ 2>/dev/null | grep 'IP Location' | cut -d'>' -f4 | cut -d'<' -f1 | cut -d',' -f3)
echo $myip
/usr/bin/osascript <<-EOF
tell application "System Events"
activate
display dialog "$myip"
end tell
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment