Digging to the final IP
LuKreme
kremels at kreme.com
Wed Oct 22 04:08:02 UTC 2014
> On 21 Oct 2014, at 19:20 , Dave Knight <dave at knig.ht> wrote:
>
> $ dig +noall +answer dave.knig.ht in a | egrep 'IN\tA\t' | cut -f6
> 216.235.14.46
Interesting. This works for me:
dig +noall +answer home.kreme.com in a | egrep '\tA' | cut -f5
but on your example, it requires -f6
And yet, the outputs appear to have the same number of fields.
$ dig +noall +answer www.kreme.com in a
www.kreme.com. 21139 IN CNAME cerebus.kreme.com.
cerebus.kreme.com. 21141 IN A 23.24.150.141
$ dig +noall +answer dave.knig.ht in a
dave.knig.ht. 13916 IN CNAME sb.sanxion.org.
sb.sanxion.org. 222 IN A 216.235.14.46
Very odd.
I use:
$ dig +short $HOSTNAME | tail -1
--
"A synonym is a word you use when you can't spell the word you first
thought of." - Burt Bacharach
More information about the bind-users
mailing list