Search This Blog

Wednesday, February 4, 2009

Getting static IP from command prompt

curl
curl (1) - transfer a URL
curl-config (1) - Get information about a libcurl installation
curl-devel (rpm) - Files needed for building applications with libcurl
curl (rpm) - A utility for getting files from remote servers (FTP, HTTP, and others)

elinks
elinks (1) - lynx-like alternative character mode WWW browser
elinks.conf [elinks] (5) - ELinks configuration file
elinks (rpm) - A text-mode Web browser

1) curl -s http://myip.dk/ | egrep -m1 --only-matching '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]{1,3}'

2) elinks -dump 1 http://myip.dk/ | egrep --only-matching '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]{1,3}'

3) curl -s http://whatismyip.org/

4) curl -s http://myip.dk/ | egrep -m1 -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]{1,3}'

5) elinks -dump 1 http://whatismyip.org/

No comments:

Post a Comment