Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dumb mail question 1

Status
Not open for further replies.

lawsoncs

Technical User
Oct 3, 2001
16
US
Hi all! I know this may be stupid, but I've never used mail before. I wrote a program to schedule another program to run on any date and time. After my scheduled program completes, I would like to mail the user a message to tell the person that it is complete. How can I do this using the mail command in my script?? Thanks a BUNCH!!
 
#!/bin/sh
# comment before message
/usr/bin/mailx <user> -s <subject>
<text of body>
# comment after message

should work, i'm sure there are a million people to tell me wrong otherwise :)
 
Hi,

After your process gets completed u can insert this simple line in that script:-
echo &quot;Process Complete&quot;|/usr/bin/mailx -s process abc@def.com

I hope this helps.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top