#md5sum
function md5comp()
a=$(md5sum $1 | awk '{print $1}')
b=$(md5sum $2 | awk '{print $1}')
echo "Comparing $1 and $2"
[ "$a" = "$b" ] && echo "Equal" || echo "Not Equal"
}
Usage:
$ md5comp filea.txt fileb.txt
Comparing filea.txt and fileb.txt
Equal