:
#
#  res_diff /path/to/secure_directory current_report
#
#   This shell script just looks to see if anything has changed since
# the last time... it just cuts out the first line (the date) and does
# a diff... returns a 0 if it has changed, a 1 otherwise...
#
#  Started to use head and tail, but some SysV doesn't have 'em.  Bah!  Who
# needs 'em anyway, when you have awk :-)
# 
DIFF=/bin/diff
TEST=/bin/test
AWK=/bin/awk
LS=/bin/ls
RM=/bin/rm

#
# Important files:
if $TEST -d "$1" ; then
	old_file=`$LS -t $1 | $AWK 'NR==1'`
else
	exit 2
	fi

# has anything changed?
$AWK 'NR > 5' $1/$old_file > /tmp/tmp.$$.foo
$AWK 'NR > 5' $2 > /tmp/tmp.$$.bar

if $TEST -n "`$DIFF /tmp/tmp.$$.foo /tmp/tmp.$$.bar`" ; then
	$RM -f /tmp/tmp.$$.foo /tmp/tmp.$$.bar
	echo There is a difference....
	exit 1
	fi

$RM -f /tmp/tmp.$$.foo /tmp/tmp.$$.bar
# echo There is no difference....
exit 0
# end
