1 #! /bin/bash
2
3 file="${1?}"
4
5 test -e "$file" || exit 0
6
7 found=$(head -n -1 "$file" | sha1sum | cut -f1 -d' ')
8 expected=$(tail -n 1 "$1" | cut -f2 -d" ")
9 test "$found" = "$expected"