LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   whatismyip (https://www.linuxquestions.org/questions/linux-newbie-8/whatismyip-883485/)

varunb 05-30-2011 06:55 AM

whatismyip
 
How to find ip from http://www.whatismyip.com using a script

and also my current script is

#!/bin/bash
echo Your external IP Address is:
wget http://www.whatismyip.com -O - -o /dev/null | grep '<TITLE>' | sed -r 's/<TITLE>WhatIsMyIP\.com \- //g' | sed -r 's/<\/TITLE>//g'
exit 0

wget www.whatismyip.com/automation/n09230945.asp -O - -q
echo

exit 0

nidhinmd 05-30-2011 07:56 AM

#!/bin/bash
echo Your external IP Address is:
wget http://automation.whatismyip.com/n09230945.asp -O - -q
echo

exit 0

varunb 05-30-2011 08:49 AM

Quote:

Originally Posted by nidhinmd (Post 4370916)
#!/bin/bash
echo Your external IP Address is:
wget http://automation.whatismyip.com/n09230945.asp -O - -q
echo

exit 0

hi

This script is working fine, i modified the script. . :)


Thankyou


All times are GMT -5. The time now is 12:24 PM.