Ubuntu 10.10+
In my script I need to lookup an IP for a given host name.
If that name is listed in /etc/hosts, then command should print IP from /etc/hosts, not from DNS server.
What commands I tried (nslookup, dig, host), completely ignore /etc/hosts — at least for names that are not known to the DNS server.
Note: I would prefer solution that would not require me to grep /etc/hosts by hand.
