Re: How to get IP address of named host?
- From: Jason Clifford <jason@xxxxxxxxxx>
- Date: Sat, 25 Feb 2006 14:07:43 +0000
On Sat, 25 Feb 2006, Gordon Henderson wrote:
getent is a fantastic little command. It will check any system database
and return the necessary data.
Well, thats a new one on me too!
but getent output might be easier to parse than host if
you're using it in a script...
(And I suspect it's also a distro thing - host is present on Debian,
as is getent, but who knows for other distros)
If it uses glibc it will have getent. host, dig and other utilities that
are part of a resolver package on the other hand may well not be present.
In truth there is no single utility that you can be certain will always be
available to you so it's useful to be familiar with several. For scripting
I prefer to use perl - that way I know what's available to me regardless
of where it's running.
Jason
--
UKFSN.ORG Finance Free Software while you surf the 'net
http://www.ukfsn.org/ up to 8Mb ADSL Broadband from just £14.98
http://www.linuxadsl.co.uk/ ADSL Routers from just £21.98
.
- References:
- How to get IP address of named host?
- From: Dave Farrance
- Re: How to get IP address of named host?
- From: Jason Clifford
- Re: How to get IP address of named host?
- From: paul
- Re: How to get IP address of named host?
- From: Jason Clifford
- Re: How to get IP address of named host?
- From: Gordon Henderson
- How to get IP address of named host?
- Prev by Date: Re: How to get IP address of named host?
- Next by Date: Re: How to get IP address of named host?
- Previous by thread: Re: How to get IP address of named host?
- Next by thread: Re: How to get IP address of named host?
- Index(es):
Relevant Pages
|
|