UNIX script to parse Zone file (is this the best code?)
- by Steve
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