Practical solutions for NIX software developers.
$ dig +short google.com A | head -n1 $ host -4t A google.com | head -n1 | awk -F' ' '{print $NF}' $ gethostip google.com | cut -d' ' -f2 $ nslookup google.com | grep -iFA2 'Non-authoritative answer:' | grep -iF 'Address:' | cut -d' ' -f2