I believe that you can ping the hostname.
ping `hostname`
This should return the IP address.
# ping `hostname`
PING myhost: 64 byte packets
64 bytes from 192.111.111.34: icmp_seq=0. time=0. ms
64 bytes from 192.111.111.34: icmp_seq=1. time=0. ms
----myhost PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
Hope this helps!!!