Digging to the final IP

Doug Barton dougb at dougbarton.us
Fri Oct 24 22:13:02 UTC 2014


On 10/21/14 8:31 PM, Frank Bulk wrote:
> Dave,
>
> Thanks for the input, but what I was looking for was a dig command that
> returns the IP(s) or a fail.  It looks like the host command is the right
> solution in this case, not dig.

Yep. :)

You can check the return value of the call to get your fail as well. For 
example:

$ host ajklasdfjklasd.com ; echo $?
Host ajklasdfjklasd.com not found: 3(NXDOMAIN)
1

hth,

Doug



More information about the bind-users mailing list