Originally posted by gkettle1983
Any idea about the binary comparison for the listing of identical files?
If the files are text files, look at the diff command. For any files, you could use md5sum which will produce a hash of the file - any change in the file changes the hash.
Try something like this
printf "Enter file to compare against --> "
md5sum $OFILE|read FSUM rest
for FILE in $(ls)
md5sum $FILE|read SUM rest
if [ "$SUM" = "$FSUM" ]
print "File $FILE is the same as $OFILE"