dotfiles

custom linux config files managed with gnu stow

dotfiles

code/sys/hash-compare.sh


#!/bin/bash

if [ "$#" -ne 2 ]; then
    echo "please supply two files to diff"
else
	sum1=$(md5sum )
	sum2=$(md5sum )

	hash1="${sum1//}"
	hash2="${sum2//}"

	if [ "$hash1" == "$hash2" ]; then
		echo "identical"
	else
		echo "different"
	fi
fi

Download

raw zip tar