hi All,
I ned to write a filewatcher script, with following requirements.
- The script should look for the file in every 5 min.
- If the file is found, it should check in every 3 min the size of file.
- if the file size has not changed in last 4 iterations (i.e. in last 12 min), the script should exit.
- if the file size changes, the script should check in every 3 min untill for last 4 iterations the files size does not change.
I am successfully able to write script which satisfy 1st condition but satisfying 2,3& 4 condition is tricky for me.
All the iteration (i.e. for file check & file size checks)
should be configurable i.e passed as arguments to script.
Appreciate your help!!