Skip to content

Instantly share code, notes, and snippets.

@yawara
Created March 6, 2015 18:04
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 yawara/cfcdb3e91827c0c57571 to your computer and use it in GitHub Desktop.
Save yawara/cfcdb3e91827c0c57571 to your computer and use it in GitHub Desktop.
getting my ip
#!/bin/bash
echo $(curl http://www.cman.jp/network/support/go_access.cgi 2>/dev/null | grep '\([0-9]\{1,3\}\.\)\{3\}' | gsed -e 's/.*[^0-9]\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{3\}\).*/\1/' | head -n 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment