The domtools package allows you to traverse DNS domain hierarchies, list all hosts (or subdomains) within a given domain, convert host name to IP address and vice-versa, convert a normal IP address to the "in-addr.arpa." format and vice-versa, and more. These commands can be used manually, or included as building blocks for higher level DNS tools. They generate output that is easily computer parsable.
86bf882cd741514bb6774767fdbd85b74348876a104a9ea663a78df1a6627785