Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to filter out Non-authoritative answer Address information if it exists so that in response I would get only "" and nothing when there is nothing returned. Here is example:

user@machine:~$ nslookup
Non-authoritative answer:

Regards, Edijs

share|improve this question
Do you only want to see a response if it's non-authoritative? – slm Feb 4 '13 at 14:49
up vote 1 down vote accepted

If I understand your question you want only answers that are authoritative? If so this isn't directly possible with a single nslookup and/or dig command (at least not to my knowledge - unless you know which nameserver is authoritative for your queried lookup).

Given this you'll have to perform 3 look ups to get an authoritative answer.

Find out who's authoritative

% nslookup -type=soa

Non-authoritative answer:
*** Can't find No answer

Authoritative answers can be found from:
    origin =
    mail addr =
    serial = 1359954681
    refresh = 7200
    retry = 7200
    expire = 604800
    minimum = 3600

Find out nameserver info

% nslookup -type=ns

Non-authoritative answer:    nameserver =    nameserver =    nameserver =

Authoritative answers can be found from:  internet address =  internet address =  internet address =

Query authority for info

% nslookup


Let me know if this is what you're after. If not I can adjust this answer if needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.