difference between nslookup and dig
Kevin Darcy
kcd at daimlerchrysler.com
Tue Feb 4 21:45:25 UTC 2003
KIRAN MN wrote:
> hi,
>
> I have old linux machine on that named is running, when i do
> reverse lookup for say 192.1.2.3 it gives output as follows.
>
> >192.1.2.3
> Server: [192.1.52.3]
> Address: 192.1.52.3
>
> Name: pure.test.com
> Address: 192.1.2.3
> >
> When i installed new version of redhat linux on some other box, i am
> getting following output in nslookup
> >192.1.2.3
> Server: [192.1.52.3]
> Address: 192.1.52.3#53
>
> 3.2.1.192.in-addr.arpa name=pure.test.com
> >
> How to change this behaviour to old. I tried setting set type=A, still
> it is giving same format of output, Please help my some of the scripts
> depend on this nslookup output.
nslookup gives one very little control over its output format. This is
just one of many ways in which it sucks. Since you have to change your
scripts anyway, why not dump nslookup altogether and use "dig" instead of
nslookup? If your scripts are written in Perl (or could be easily
converted to Perl), then even better yet would be to use the
Net::DNS Perl module.
- Kevin
More information about the bind-users
mailing list