From 4b85779426788064f1e891c9ba0ac36593342db3 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 19 Jan 2020 17:51:18 +0530 Subject: [PATCH] First commit --- checkintegrity | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 checkintegrity diff --git a/checkintegrity b/checkintegrity new file mode 100755 index 0000000..6d0f9af --- /dev/null +++ b/checkintegrity @@ -0,0 +1,10 @@ +#!/bin/bash + +f=$1 +f+="sum $2 | cut -d ' ' -f1" + +if [ $(eval $f) = "$3" ]; then + echo "$2 is fine." +else + echo "$2 is corrupted!" +fi