hi I want to create a bash file on linux, which checks the md5 hash of a file against a backup md5 hash, so i know if the original file has been tampered with. The script should output the md5 hash of two files and than compare the two created hash files:
md5sum file1 > file1.md5 | cut -c -32
if [ file1.md5 =! backup.md5 ] then;
#send email
but it does not work, there is still the filename in the file.md5, has someone an idea on how to only get the has to the file.md5?