#!/bin/bash dig @127.0.0.1 ddns.eckner.net AXFR \ | grep '^[^;]' \ | awk '{print $1 " " $4}' \ | grep -vwF 'pool32.ddns.eckner.net.' \ | grep ' A\(AAA\)\?$' \ | sort -u \ | sed ' s/^\(\S\+\) \(\S\+\)/update delete \1 IN \2/ 1 i zone ddns.eckner.net. $ a send '