in reply to RE: Re: extract uniques and sort
in thread extract uniques and sort

That isn't really necessary. So long as your domain is properly configured in your network subsystem (e.g. in /etc/resolv.conf), attempting to resolve "www" is equivalent to resolving "www.example.com".

If you want to skip the step of actually attempting to resolve the hostnames, you can try to parse /etc/resolv.conf yourself and tack on each of the 'search' or 'domain' items (not sure what all is used), since you could technically have more than one. But if it's a custom app just for 1 location/purpose, I guess you could hard-code it without worry.

Replies are listed 'Best First'.
RE: RE: RE: Re: extract uniques and sort
by geektron (Curate) on Sep 23, 2000 at 05:05 UTC
    it's actually easier to do it that way. my intranet is globally distributed, and /etc/resolv.conf isn't going to contain every host/ type of host.

    but for others, it's probably a valid approach.