All,
Is there a way to keep checking for a file over and over again in the same script for an interval of time?
Ie
If [no file] {
mail -user
continue checking until file arrives
file arrives
tasks
exit
I don't want the script to run each time and email the user each time a file isn't there. So, I want it to continue checking the file until it arrives and only exit when the file shows up.
We receive a FTP everyday at a certain time in the morning. I want to write a script that would send email notification to all stakeholders, if the file has not arrived on any particular day.
I am new to UNIX and apart from the basic commands know very little about scripting. Can you please help me with this script and explain it as well so I could understand and do it on my own the next time such a task comes up.