getting IP address of router

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Feb 8 15:01:20 UTC 2005


On Mon, Feb 07, 2005 at 04:02:04PM -0500, jim ruxton wrote:
> Thanks again Adam. I didn't have Lynx, guess it doesn't come with
> Fedora. I installed it and this works, thanks. What I'd like to easily
> be able to do is grab my internet IP address and pass it on to a script.
> I guess I could parse what comes back from myip.dk but I keep thinking
> there must be an easier way.

dog http://www.myip.dk|tail -1|sed -e 's%.*IP: \(.*\)</title>.*%\1%'

Is that easy enough?

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