in reply to Re: ip address get problem
in thread ip address get problem
This works to get the hostname. It is the following bit of code that does not work to translate that hostname into an ip address:$hostname = `hostname`; print "hostname is $hostname\n";
$source = `ypcat hosts | grep '$hostname$'`; $source =~ /\d+.\d+.\d+.\d/; print "source is $addr\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ip address get problem
by Abigail-II (Bishop) on Mar 22, 2004 at 16:17 UTC |