Hi,
I'd appreciate some help in getting just the PTR record from the
following dig command:
dig +short -x 192.0.2.1
With the following germane content from the respective zones:
1.2.0.192.in-addr.arpa. IN CNAME nic.host.example.net.
nic.host.example.net. IN PTR host.example.net.
nic.host.example.net. IN A 192.0.2.1
host.example.net. IN A 192.0.2.1
When I run the dig command above, I get two lines of output:
nic.host.example.net.
host.example.net.
I'm looking at scripting the collection of the value of the PTR record;
host.example.net. But my old method of "$(dig +short -x 192.0.2.1)"
isn't compatible with the RFC 2317 Classless IN-ADDR.ARPA Delegation /
CNAME method. As such, I'm looking to update it.
Is there another -- hopefully -- simple command that I can run to get
just the PTR value?
I took a look at `drill` and it seems to do similar and comes with it's
own complications.
The venerable `host` also seems to produce multiple lines of output.
Or am I looking at something to post-process the output from dig et al.
or my own custom utility (Perl / Python code) to use beside dig et al.?
--
Grant. . . .
unix || die
--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from
this list
ISC funds the development of this software with paid support subscriptions.
Contact us at https://www.isc.org/contact/ for more information.
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users