> Submitted 01-Sep-00 by Sarang Lakare:
> > Whats the command to get IP address of u're machine? The only way I know of
> > is thru kppp when using modem... I am talking of dynamic IP addresses
> > here.. I want something which i can put in a script!
>
> Assuming that you have only one network connection, i.e. a dialup without a
> lan, you can do:
>
> /sbin/ifconfig | grep addr | grep -v 127.0.0.1 | awk '{print $2'}' | awk -F: '{print
>$2}'
>
> (That should be all one line.)
Small type after the $2' - should be just $2
When I tried it on mine, I also get the LAN IP for the same machine (firewall).
You can add ' | grep -v 192.168. ' after the 127.0.0.1 to remove that
Thanks... Dan.
- Re: [expert] How to see IP address? Terry Tremaine
- Re: [expert] How to see IP address? peter church
- Re: [expert] How to see IP address? Sarang Lakare
- Re: [expert] How to see IP address? Ron Johnson, Jr.
- Re: [expert] How to see IP addre... Sarang Lakare
- Re: [expert] How to see IP ... Gavin Clark
- Re: [expert] How to see IP address? Stew Benedict
- Re: [expert] How to see IP addre... Sarang Lakare
- Re: [expert] How to see IP ... Greg Stewart
- Re: [expert] How to see IP address? Anton Graham
- Re: [expert] How to see IP address? Daniel Woods
- Re: [expert] How to see IP address? Ken Thompson
- [expert] Error in /var/log/messages J. Pedro Sousa do Amaral
- Re: [expert] How to see IP address? Sarang Lakare
- RE: [expert] How to see IP address? Eric Peters
- Re: [expert] How to see IP address? Ron Johnson, Jr.
