mail notification on file generation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mail notification on file generation
# 1  
Old 08-25-2008
mail notification on file generation

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 alwaysSmilie
# 2  
Old 08-25-2008
The steps needed to create this script would likely be:

1. create two messages, one for the error state, one for the non-error state.

2. 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.
# 3  
Old 08-25-2008
thanks a lot...Smilie
i'll try on that.. n if ther's any prob i'll get back..
thank u...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for sending notification mail

hi all, needed a script to send a notfication mail if the specified folder had the copy of the files that are older than 15 days i.ee for example my folder name is SAi and the files are as follows sai.txt copyofsai.txt copyofcopyofsai.txt hemanth.txt copyofcopyofhemanth.txt... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

2. Shell Programming and Scripting

AIX mail notification

plzzz help me, I want to send emails for exchange group members when the used file-system % gets more than 90%, this notification must include df -g, netstat -i,and errpt with the hostname thx in advance (0 Replies)
Discussion started by: majd_ece
0 Replies

3. Infrastructure Monitoring

Mail Notification in nagios

Hi guys, I have configured Nagios in My Ubuntu8.4 machine through Quickstart Guide, All things are working fine. Now i want to get Services Notification mails on my personal Email-id,what configuration is needed to get the mails,any assistance would be appreciable. Thanks in advance. (3 Replies)
Discussion started by: daya.pandit
3 Replies

4. Shell Programming and Scripting

file generation and mail notification

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... (4 Replies)
Discussion started by: anzie.sharma
4 Replies

5. AIX

notification mail when password expired

Hallo, can anybody help me with my issue? Iīd like to know if it is possible to send me a mail (to @mail.com for example) when some account password will expired? eg. few days ago of this expiration. We donīt use this account every day, it is used for DB2 and DB2 has problem every 90īs day because... (2 Replies)
Discussion started by: JiriVenera
2 Replies
Login or Register to Ask a Question