1#!/bin/sh 2 3# Example program to show how one might compare a legacy, hand-crafted, zone 4# with a newly generated zone. 5 6OLD=/var/named/cibernet.com..zone 7NEW=INTERNAL.cibernet.com 8DOMAIN=cibernet.com. 9 10canonzone $DOMAIN <$OLD | 11 grep "IN A" | 12 awk '{ print $4 " " $0 }' | 13 sortbyip |cut -d" " -f2- > old.txt 14 15canonzone $DOMAIN <$NEW | 16 grep "IN A" | 17 awk '{ print $4 " " $0 }' | 18 sortbyip |cut -d" " -f2- > new.txt 19 20echo Lines only in $OLD: 21echo " " comm -23 old.txt new.txt 22echo Lines only in $NEW: 23echo " " comm -13 old.txt new.txt 24echo Lines different in each: 25echo " " comm -3 old.txt new.txt 26