Is there a way to use dig to look up an A record then immediately do an reverse lookup on the returned IP address? dig somehostname.com dig -x 1.2.3.4