getting IP address of router

jim ruxton cinetron-uEvt2TsIf2EsA/PxXw9srA at public.gmane.org
Thu Feb 10 18:23:45 UTC 2005


> > 
> > # 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.
bizarre, One thing I noticed is that I can remove the tail command from
above and I get the same result. I don't think it's really necessary
hear anyway is it?
Jim
> 
> 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
> 

--
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