You could use

CURRENT_IP=`/sbin/ifconfig eth0 | grep 'inet addr' | cut -d : -f 2 | cut -d ' ' -f 1`

in your script if you want to return the current ip address for eth0



On Fri, 2004-01-02 at 11:11, [EMAIL PROTECTED] wrote:
Hi,


I'm using DHCP for getting a IP address is there a file where the IP-address is stored ?
I need to write a script that needs to know the IPaddress.
I know "/sbin/ifconfig"

TIA
Patrick





--------------------------------------
Telenet Webmail opent je wereld




--
[EMAIL PROTECTED] mailing list
--
Karl Huysmans <[EMAIL PROTECTED]>

Reply via email to