Globemaster
asked on
Getting a value from a Web Page from Linux shell ??
Hello,
Before continuing please excuse my ignorance on this topic because i am relative new to Unix.
I am trying to get my ip-address from http://checkip.dyndns.org through some way in Linux shell. Basically what i want to do is retrieve my ip address that is generated in the index.html file if i browse to that specific site.
I have tried doing a wget http://checkip.dyndns.org and i downloaded the index.html file which contains my correct ip-address inside, but i am not able to retrieve (parse) the html file to get only the IP.
Is there any way you can help me to do this.
Thank you in advance.
Before continuing please excuse my ignorance on this topic because i am relative new to Unix.
I am trying to get my ip-address from http://checkip.dyndns.org through some way in Linux shell. Basically what i want to do is retrieve my ip address that is generated in the index.html file if i browse to that specific site.
I have tried doing a wget http://checkip.dyndns.org and i downloaded the index.html file which contains my correct ip-address inside, but i am not able to retrieve (parse) the html file to get only the IP.
Is there any way you can help me to do this.
Thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sed -e "s/^.*: //" -e "s/<.*$//" index.html