Hello
when i'm connected to the Internet via ADSL modem
How can I know my computers adress?
The dynamic adress given by my provider.
Printable View
Hello
when i'm connected to the Internet via ADSL modem
How can I know my computers adress?
The dynamic adress given by my provider.
serge_moscou a écrit :[color=blue]
> Hello
>
> when i'm connected to the Internet via ADSL modem
>
> How can I know my computers adress?
>
> The dynamic adress given by my provider.
>
>[/color]
You are here: [url]http://www.ip-adress.com/[/url]
On Sat, 17 Mar 2007 07:42:03 +0100, Thierry MERLE wrote:[color=blue]
> serge_moscou a écrit :[color=green]
>> Hello
>>
>> when i'm connected to the Internet via ADSL modem
>>
>> How can I know my computers adress?
>>
>> The dynamic adress given by my provider.
>>
>>[/color]
> You are here: [url]http://www.ip-adress.com/[/url][/color]
I hacked out a script for this. (Re)working the following may serve your
needs:
|#!/bin/sh
|echo -n ' PC ip: ' && /sbin/ifconfig | grep 'inet addr:' | \
| grep -v '127.0.0.' | cut -d: -f2 | cut -d' ' -f1
|echo -n 'Net ip: ' && \
| wget -O- [url]http://cfaj.freeshell.org/ipaddr.cgi[/url] 2>/dev/null
The output from your ifconfig may be formatted differently than mine:
|$ /sbin/ifconfig --version
|net-tools 1.60
|ifconfig 1.42 (2001-04-13)
.... thus the (possible) need for reworking the first piece of the
script. (I know the ifconfig on my ISP's FreeBSD shell is WAY different
than this MDK workstation.)
HTH
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
*** Killfiling google posts: <http://jonz.net/ng.htm>