[Pdns-users] Duplicate SOA while using dig and zone2sql

Rejo Zenger pdns-users at subs.krikkit.nl
Thu Apr 24 05:48:53 UTC 2008

++ 23/04/08 23:20 +0200 - Ton van Rosmalen:
>   I've been brushing up my skills using sed and came to the following:
>   dig @$DNSSERVER $DOMAIN AXFR | sed -e '/;/d;/SOA/{h; d;};$g'
>   This strips out comments and pastes one SOA record at the end after
>   deleting all occurrences from the dig-output.

Try a "dig -h", it'll list quite some usefull command line options.  
Using the "+noall +answ" options gives you the zone only, without 
anything else. You would need to strip the last line only.

Rejo Zenger . <rejo at zenger.nl> . 0x75FC50F3 . <https://rejo.zenger.nl>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20080424/142f23bc/attachment-0001.sig>

More information about the Pdns-users mailing list