16 lines
343 B
Fish
Executable File
16 lines
343 B
Fish
Executable File
function compare_sha256
|
|
if test (count $argv) -ne 2
|
|
echo "Usage: compare_sha256 <file1> <file2>"
|
|
return 1
|
|
end
|
|
|
|
set hash1 (sha256sum $argv[1] | awk '{print $1}')
|
|
set hash2 (sha256sum $argv[2] | awk '{print $1}')
|
|
|
|
if test "$hash1" = "$hash2"
|
|
echo "Match"
|
|
else
|
|
echo "Different"
|
|
end
|
|
end
|