Scripting DNS lookups

Are you writing a script and some command doesn’t accept hostnames and you don’t want to inline the IP address? dig +short is your friend!

$ dig +short gbenson.net
69.163.152.201