On Tue, Dec 17, 2002 at 12:14:33AM -0500, Brian York wrote: > How can i find out the ip address of a machine that has been assigned an ip > by DHCP.
Here's a hack I use: #!/usr/bin/perl # Script to print IP address of ethernet connection on the local machine. open(FILE, "/sbin/ifconfig eth0|") || die "Unable to run ifconfig\n"; while (<FILE>) { chomp; if (/inet addr:(\S+)/) { print "$1\n"; last; } } close (FILE);
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com