I'm very new to unix. I need help in writing a shell script that will automatically take output file from a particular folder from a server and if the file is generated send email notifications to certain group of ppl and if it is not generated send a mail wid error msg..
can any1 help me on that.. just a sample script wud also do..
Thanks as always:b:
The steps needed to create this script would likely be:
-
create two messages, one for the error state, one for the non-error state.
-
decide whether there is an error
3.a. if error pipe the error message to the mail command
3.b. if not pipe the non-error message to the mail command
as a hint the mail command could be:
mail -s "subject line of mail command" address <message.file
Try writing a script with those steps, and see how it goes. If/when you have trouble come back and ask, posting what you have written so far.
thanks a lot...
i'll try on that.. n if ther's any prob i'll get back..
thank u...