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" }'

Mark


In message <[email protected]>, 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
> [email protected]
> 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: [email protected]
_______________________________________________
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

Reply via email to