#! /usr/bin/ksh
# autoloads for ksh
# these are the ksh functions accessed by this function
#
# Function compAFs:
# Uses diff -w (ignore spacing) to compare the contents of two attribute.
# files specified as positional parameters one and two.  If the contents
# are equal a return 0 equals success, otherwise a return 1 is used.
#
# Input positional parameters:
#     $1. Attribute file name of the 1st file.
#     $2. Attribute file name of the 2nd file.
#
# This function returns 0 if success, else an error
#
# Author: Giovanni Perrone

# Compare the two files specified
diff -w $1 $2 >> compAFs.LOG

if [[ $? -ne 0 ]]
  then
    reportError 'Function compAFs: Compare of files ' "${1}" ' and ' "${2}" ' fails.'
    exit 1
  else
    echo 'Function compAFs: files ' "${1}" ' and ' "${2}" ' are identical.'
    exit 0
fi
