Digging to the final IP

Warren Kumari warren at kumari.net
Tue Oct 21 19:07:15 UTC 2014


On Mon, Oct 20, 2014 at 1:19 PM, Mark Andrews <marka at isc.org> wrote:
>
> Why do we need to have a option to dig to massage the results into
> every possible different form?
>
> dig A $name | awk '$0 ~ /status/ && $0 !~ /status: NOERROR,/ {
>                         sub(",", "", $6 ); print $6; x=1
>                    }
>                    $4 == "A" { print $5; x=1 }
>                    END { if (!x) print "TIMEOUT" }'


Because, not everyone is as stunningly brilliant as you?

To a non-zero population of this list the above looks like line-noise...

W

>
> Mark
>
>
> In message <54451077.8030907 at imperial.ac.uk>, Phil Mayers writes:
>> On 20/10/14 14:22, Frank Bulk (iname.com) wrote:
>> > We=92re using this in a bash shell script.  I don=92t think there=92s a n=
>> ative
>> > shell command to get the IP, so I=92ll use a mixture of host and dig as
>> > necessary.
>>
>> If your system has it, try "getent" e.g.
>>
>> getent ahosts hostname
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscri=
>> be from this list
>>
>> bind-users mailing list
>> bind-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users



-- 
I don't think the execution is relevant when it was obviously a bad
idea in the first place.
This is like putting rabid weasels in your pants, and later expressing
regret at having chosen those particular rabid weasels and that pair
of pants.
   ---maf


More information about the bind-users mailing list