#!/bin/sh

if [ $# != 2 ]; then
  echo "Usage: `basename $0` [name_file_to_check] [md5_hash]"
  exit 1
fi

hash=$(md5sum "$1")

res=$(echo "$hash" | grep -w "$2")

if test "$res" = "$hash"
then
   echo OK
else
   echo ERR
fi
