DEV Community

Query Filter
Query Filter

Posted on

match

files_match() { [[ "$(md5sum "$1" | cut -d' ' -f1)" == "$(md5sum "$2" | cut -d' ' -f1)" ]]; }


if files_match file1 file2; then
    echo "Match"
else
    echo "Do not match"
fi
Enter fullscreen mode Exit fullscreen mode

Top comments (0)