-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathns.l
17 lines (15 loc) · 1.13 KB
/
ns.l
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# script that consumes a file of domains called domains, one per line, and extracts their nameservers to a file named result
(setq *Domains (make
(in "domains"
(until (eof)
(link
(line T))))))
(setq *DomainsAndNameservers (make
(for X *Domains
(in (list 'host "-t" "ns" X)
(until (eof)
(and
(match '(@A " " @B " " @C " " @D ".")(line))
(link (pack X " " @D))))))))
(out "+result" (for X *DomainsAndNameservers (prinl X)))
(bye)