That's funny it reminds me a lot of an awk script we used to use to push zone files... when I worked at domain name registry in New Zealand. It was wrapped in a lot of pearl for extra job safety, lots of weird issues with special characters, working in the DNS space is very interesting, lots of security overlap and problems like trying to stop people using the system for botnet command and control centres.