#!/bin/bash #Remember to redirect the output into some file! for tld in $(ls db/dom/); do for domain in $(ls db/dom/${tld}/); do for ns in $(cat db/dom/${tld}/${domain}/ns/*); do echo server=/${domain}.${tld}/${ns}; done; done; done