getting IP address of router
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Feb 10 16:59:12 UTC 2005
On Wed, Feb 09, 2005 at 08:46:01PM -0500, jim ruxton wrote:
> Thanks Lennart,
> I tried this:
>
> # curl -s -o - http://www.myip.dk|tail -1|sed -e 's%.* IP:
> \(.*\)</title>.*%\1%'
Hmm, it works here. Make SURE it is on one line.
curl -s -o - http://www.myip.dk|tail -1 |
sed -e 's%.* IP: \(.*\)</title>.*%\1%'
Now in the case below I see </font> following the IP, which is not what
I got, so I wonder what is different.
> and for some reason where I should be left with just the IP address some
> of the rest of the page appears. I can't figure out why. Any idea why
> I'm not left with just the IP number?? The text before and directly
> after the IP number is stripped away but some of the file remains. Here
> is the output I get:
>
> 66.229.220.69???</font><br> <input type="text" name="ip"><br>
> <input type="submit"
> value="Konverter"></form></center><p> <center><p><form
> method="post" action="/CMyip.dll?DoReverseFormConvert2"
> name="form1"><font size="2" face="Verdana">Skriv hostname'et du vil have
> IP'en p???</font><br> <input type="text" name="hostname"><br> <input
> type="submit"
> value="Konverter"></form></center><p> <center><p><form
> method="post" action="/CMyip.dll?DoDecFormConvert" name="form1"><font
> size="2" face="Verdana">Skriv IP'en du vil have lavet om til decimal
> form:</font><br> <input type="text" name="ip"><br> <input
> type="submit"
> value="Konverter"></form><br><br><br></center></body><!-- I Love you
> Eva B. Einarsdttir :)--></html>
How odd, given it works perfectly from this system.
Lennart Sorensen
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list