Added Updates
This commit is contained in:
15
functions/compare_sha256.fish
Executable file
15
functions/compare_sha256.fish
Executable file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user