On Mon, 22 Mar 1999, Tuan Hoang wrote:

> What is the best way to get the ip address from
> a device, such as ppp0, ppp1, eth0, eth1, etc...?
> 
> Are there a few ways?  Easiest?  Pro's & Con's?

I'm trying to do the same thing. What I want to do, is in a shell script
that I'll eventually add to /etc/rc.d/init.d is to get the IP address of
the local machine. Now, of course the machine can have multiple
interfaces, so just looking at the output of ifconfig doesn't help a lot.

What I want to do is look up the name of the machine, then look in
/etc/hosts for the corresponding IP address. 

There really should be  standard function in /etc/rc.d/init.d or
something similar. 

Bill

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to