LawsHosting
Verified User
I would like to display/save all nameservers for domains, here is what I currently have:
However, I would like for it to just display if the nameservers are different to, say, ns1.laws-hosting.co.uk, n2., n3, n4, in this format:.
Any advice will be grateful.
EDIT:
I forgot to say my nameservers are hosted elsewhere.
Code:
for u in `ls /usr/local/directadmin/data/users`; do
{
for d in `cat /usr/local/directadmin/data/users/$u/domains.list`; do
{
echo "------------$d------------"
nslookup -querytype=NS $d >> /tmp/domain_list.txt
echo "--------------------------"
done;
}
done;
}
I understand the cut command will be used here, I'm not too hot on bash scripting.------------domain------------
domain nameserver = nameserver
...
....
--------------------------
Any advice will be grateful.
EDIT:
I forgot to say my nameservers are hosted elsewhere.
Last edited: