CheckIntegrity/CheckIntegrity

10 lines
136 B
Bash
Executable file

#!/bin/sh
f=$1
f+="sum $2 | cut -d ' ' -f1"
if [ $(eval $f) = "$3" ]; then
echo "$2 is fine."
else
echo "$2 is corrupted!"
fi