We’re using this in a bash shell script. I don’t think there’s a native shell command to get the IP, so I’ll use a mixture of host and dig as necessary.
Thanks, Frank From: Fajar A. Nugraha [mailto:w...@fajar.net] Sent: Sunday, October 19, 2014 11:04 PM To: Frank Bulk Cc: comp-protocols-dns-b...@isc.org Subject: Re: Digging to the final IP What are you using this for? If it's part of a script, it might be easier to just use gethostbyname. For example, in php: http://php.net/manual/en/function.gethostbyname.php , Returns the IPv4 address or a string containing the unmodified hostname on failure. -- Fajar On Mon, Oct 20, 2014 at 10:43 AM, Frank Bulk <frnk...@iname.com <mailto:frnk...@iname.com> > wrote: Thanks, what I ended up using. Didn't think that there was anything host could do that dig couldn't do. Frank -----Original Message----- From: bind-users-boun...@lists.isc.org <mailto:bind-users-boun...@lists.isc.org> [mailto:bind-users-boun...@lists.isc.org <mailto:bind-users-boun...@lists.isc.org> ] On Behalf Of Barry Margolin Sent: Sunday, October 19, 2014 5:00 AM To: comp-protocols-dns-b...@isc.org <mailto:comp-protocols-dns-b...@isc.org> Subject: Re: Digging to the final IP In article <mailman.1097.1413711142.26362.bind-us...@lists.isc.org <mailto:mailman.1097.1413711142.26362.bind-us...@lists.isc.org> >, Sten Carlsen <st...@s-carlsen.dk <mailto:st...@s-carlsen.dk> > wrote: > Would "host" be closer to what you want? Host also tells you about aliases it encounters along the way. > > > -- > Best regards > > Sten Carlsen > > No improvements come from shouting: > > "MALE BOVINE MANURE!!!" > > > On 19 Oct 2014, at 08:05, Karl Auer <ka...@biplane.com.au > > <mailto:ka...@biplane.com.au> > wrote: > > > >> On Sun, 2014-10-19 at 00:26 -0500, Frank Bulk wrote: > >> Is there a dig option that will list out the final (IPs) or query result?? > >> By default, even with +short, it can list intermediate CNAME(s) and not > >> what > >> IP(s) that CNAME may have. > > > > Not great, but might be enough to be helpful: > > > > dig +nonssearch $1 | egrep -i "STATUS|^$1" > > > > Regards, K. > > > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Karl Auer (ka...@biplane.com.au <mailto:ka...@biplane.com.au> ) > > http://www.biplane.com.au/kauer > > http://twitter.com/kauer389 > > > > GPG fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882 > > Old fingerprint: B862 FB15 FE96 4961 BC62 1A40 6239 1208 9865 5F9A > > > > > > _______________________________________________ > > Please visit https://lists.isc.org/mailman/listinfo/bind-users to > > unsubscribe from this list > > > > bind-users mailing list > > bind-users@lists.isc.org <mailto:bind-users@lists.isc.org> > > https://lists.isc.org/mailman/listinfo/bind-users -- Barry Margolin Arlington, MA _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org <mailto:bind-users@lists.isc.org> https://lists.isc.org/mailman/listinfo/bind-users _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org <mailto:bind-users@lists.isc.org> https://lists.isc.org/mailman/listinfo/bind-users
_______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users