Question about app or script to monitor changes
Posted on 2006-06-03
I wrote a bash script that reads a file, does a bunch of stuff then writes a value into mysql.
We then made this script loop and have it load on startup in a cron job.
Is there a better way to do this? Basically I have a dir, where the files are being constantly updated - and what I would like to know is when the file changes. Then write to db. Is there a better way to program this? Any recommendations?
Right now, I just keep reading the file, and if its different than what I have in my db, I write to log and update current value.
Looking for suggestions. Just as a side note -- we had a vb.net app that would load current value into a text box, then when the text box would change -- to do what it needed to do. Looking to do something compareable in Linux. We do have it working with bash and mysql right now... seeing if there is a better way.