Created
September 26, 2016 03:08
-
-
Save dungmanh88/5b374965ad6fe73f9f33081dcceedc3d to your computer and use it in GitHub Desktop.
Compare two files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff <file1> <file2> | |
or | |
sum1=`md5sum <file1> | cut -d " " -f 1` | |
sum2=`md5sum <file2> | cut -d " " -f 1` | |
[ "$sum1" == "$sum2" ] && echo "equal" || echo "not equal" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment