UNIX script to parse Zone file (is this the best code?)
Posted
by Steve
on Stack Overflow
See other posts from Stack Overflow
or by Steve
Published on 2010-05-07T00:25:41Z
Indexed on
2010/05/07
0:38 UTC
Read the original article
Hit count: 256
Hi,
FOund the following on: http://mike.murraynet.net/2009/08/23/parsing-the-verisign-zone-file-with-os-x/
Can unix-masters have a look at it and see if its the best possible way to gather the unique domainsnames in a zone file?
For .NET domains: grep “^[a-zA-Z0-9-]+ NS .” net.zone|sed “s/NS .//”|uniq >> netdomains.txt
For .COM domains: grep “^[a-zA-Z0-9-]+ NS .” com.zone|sed “s/NS .//”|uniq >> comdomains.txt
For .EDU domains: grep “^[a-zA-Z0-9-]+ NS .” edu.zone|sed “s/NS .//”|uniq >> edudomains.txt
© Stack Overflow or respective owner