Bash, jeśli zawartość pliku jest równa

str=ABCD
if [[ $(< test.txt) != "$str" ]]; then
    # send e-mail
fi
feddynventor