Comparing checksums from a directory and checksums from a store.txt file line by line to see if changes were made

i am facing a problem with my bash script whereby I need to compare the checksums of my backup files from my /axa/backup/ directory and the store.txt file in which I have stored my checksums in to make sure that no changes have been made. I am required to use a for loop and a if-else loop but it seems to not work as I seldom use it.

This is my bash script that I have written :


for md5sum in /sads/backup/*.tgz


if [ "md5sum" = cat store.txt ]

     echo "no changes made in /sads/backup/*.tgz "


     echo "Changes made in /sads/backup/*.tgz "



Source: bash

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.