Skip to content

Instantly share code, notes, and snippets.

@hplc
Created December 17, 2011 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hplc/1491844 to your computer and use it in GitHub Desktop.
Save hplc/1491844 to your computer and use it in GitHub Desktop.
Chech all files MD5 in one subdirectory, find out the same one.
#!/bin/sh
# Sum student's upload files MD5.
# Check whether they copy file each other.
# Tested in CentOS Linux.
dir=`date +%Y.%m.%d`
output="result.html"
echo -e "<pre>\n$dir" >> $output
md5sum $dir/* | sort | uniq -Dw32 | sed -e "s/$dir\///" >> $output
echo "</pre>" >> $output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment