digcomp.pl revision ec5347e2c775f027573ce5648b910361aa926c01
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2000, 2001 Internet Software Consortium.
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# Permission to use, copy, modify, and/or distribute this software for any
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# purpose with or without fee is hereby granted, provided that the above
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# copyright notice and this permission notice appear in all copies.
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# PERFORMANCE OF THIS SOFTWARE.
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# $Id: digcomp.pl,v 1.13 2007/06/18 23:47:27 tbox Exp $
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# Compare two files, each with the output from dig, for differences.
cfd262045c23cadb8415f0111f56995258f17361Evan Hunt# Ignore "unimportant" differences, like ordering of NS lines, TTL's,
while (<FILE1>) {
if (/^;.+status:\s+(\S+).+$/) {
$count++;
close(FILE1);
while (<FILE2>) {
if (/^;.+status:\s+(\S+).+$/) {
$count--;
$printed++;
close(FILE2);
$printed++;
exit($status);