I have a script that checks the content of a file(text.txt) every 30 minutes, the contents of this file (8 digit random number) should change every 30 minutes. The script checks the contents against the last check and alerts if the content is the same. Rather than send an alert each time is doesn't change, I want it to only alert if the file is the same after 3 consecutive checks. I think that I can probably do this be setting some kind of count value, but not sure how to do this.
Any help would be greatly appreciated.
Any help would be greatly appreciated.