bulk comparing files by sha256
8/14/2024
Hashing files with openssl and comparing with beyond compare.
ls split *.{py,csv}> splitlist.txt
while IFS= read -r filename
do
splithash=$(openssl sha256 split/$filename | awk '{print $2}')
sourcehash=$(openssl sha256 $filename | awk '{print $2}')
#echo "Source hash $sourcehash and split hash $splithash"
if [[ "$splithash" != "$sourcehash" ]] && [ -f "$filename" ]; then
bcompare "split/$filename" "$filename"
else
echo "Skipping $filename as there was no change"
fi