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:[email protected]] Sent: Sunday, October 19, 2014 11:04 PM To: Frank Bulk Cc: [email protected] 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 <[email protected] <mailto:[email protected]> > 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: [email protected] <mailto:[email protected]> [mailto:[email protected] <mailto:[email protected]> ] On Behalf Of Barry Margolin Sent: Sunday, October 19, 2014 5:00 AM To: [email protected] <mailto:[email protected]> Subject: Re: Digging to the final IP In article <[email protected] <mailto:[email protected]> >, Sten Carlsen <[email protected] <mailto:[email protected]> > 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 <[email protected] > > <mailto:[email protected]> > 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 ([email protected] <mailto:[email protected]> ) > > 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 > > [email protected] <mailto:[email protected]> > > 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 [email protected] <mailto:[email protected]> 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 [email protected] <mailto:[email protected]> 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 [email protected] https://lists.isc.org/mailman/listinfo/bind-users

