#!/bin/sh
# diff that ignores debug output.
#
# $1 and $2 are files to compare
#
# string to compare:
# (don't put special characters in it since those could cause quoting problems)
IGNORE=Z4D

# note above is hard-coded.
# probably leave it that way or make environment variable
# (but not command-line option; o.w., jrv would need to deal with it)

# be sure to generate unique temps:
# several jrv can run at the same time,
# either by one user or several.

TEMPLATE=/tmp/jrvdiffXXXXXX

# could also include, e.g., _$1 and _$2, for better names, but that gets long.
t1=`mktemp $TEMPLATE`
t2=`mktemp $TEMPLATE`

## could clean up, but will leave for now.
## useful for some debugging.
## trap 'x=$?; /bin/rm -f $t1 $t2; exit $x' 0 1 2 15

grep -v $IGNORE $1 > $t1
grep -v $IGNORE $2 > $t2
diff $t1 $t2
