Sorry but there are a few clarifications necessary:
First, please tell us on which OS(es) this is supposed to run, which shell you want to use (optionally which version of these), etc..
Second:
Quote:
Originally Posted by
xgringo
I need something to say if these two file extensions exist in this directory *err and *rpt
zip up these files into one zip file and email them to me.
Do you mean you need to initiate said action when
both an
*.err and a
*.rpt file are present or if
any of these is present?
Quote:
Originally Posted by
xgringo
If they don't exist wait 2 hours and check again.... Not sure how to determine if I need to do an if then statement or a while true or a for loop.
This is easy to answer: neither one. Put the final script, which just checks once, into
crontab and let
cron take care of calling it every two hours. That, after all, is what it was designed for.
I hope this helps.
bakunin