# this will print if they're identical or not
diff file1 file2 -s
if diff -u "$file1" "$file2"; then
echo "$file1 and $file2 have identical contents"
else
: # the differences between the files have been listed
fi
if cmp -s "file1" "file2"
then
echo "The files match"
else
echo "The files are different"
fi