GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
1
Issues
4
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
hashdiff
Browse code
Added basic script
master
1.0
1 parent
cda951b
commit
4a6d6131a7c40e6c430a47c8f9124a52a9150f28
Nigel Stanger
authored
on 27 Nov 2020
Patch
Showing
1 changed file
hashdiff
Ignore Space
Show notes
View
hashdiff
0 → 100755
#!/usr/bin/env bash # Compare two files by hash. # Based on http://alanwsmith.com/command-line-one-liner-to-compare-files-with-md5 # Future enhancements: # * different hashes # * "paranoid" mode (use several different hashes) # * compare more than two files # * verbose: print out hashes if different file1=$1 file2=$2 if [ $(md5 -q ${file1}) == $(md5 -q ${file2}) ] then echo "identical" else echo "different" fi
Show line notes below