You never specified what you want. "Sometimes"??? Is that a
specification? For instance, NXDOMAIN is *not* an error.

May be you actually want something like:

 ADDRS=$(dig +short www.google.com); if [ -z "$ADDRS" ]; then echo
FAILURE; else echo SUCCESS; fi

For another example of testing dig results, see the script in
http://www.bortzmeyer.org/files/try-get-zone.sh

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in Ubuntu.
https://bugs.launchpad.net/bugs/854705

Title:
  dig returns 0 regardless of result of query

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/854705/+subscriptions

-- 
Ubuntu-server-bugs mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to