Il y a plusieurs command line utilities to resolve host names (host, dig, nslookup), however they tous use nameservers exclusively, tandis que applications in general look in /etc/hosts premier (using gethostbyname I believe).
Is there a command line utility to resolve host names that behaves like a usual application, thus looking in /etc/hosts premier et seulement alors asking a nameserver?
(Je suis aware that it would probably be like 3 lines of c, mais J'ai besoin de it inside of a somewhat portable shell script.)