GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to script a mail command
Operating System - HP-UX
1845938
Members
4083
Online
110250
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2003 08:44 PM
12-17-2003 08:44 PM
hi all,
got HP workstation an several scripts running. one of them is responsible for creating daily archives. now: i would like it to warn me via e-mail in case one of the archived files is corrupted (no matter bout the verification procedure).
the question is: how to include a "mail" command within a script, so that a short communicate is generated and sent to an address given?
thanks in advance.
got HP workstation an several scripts running. one of them is responsible for creating daily archives. now: i would like it to warn me via e-mail in case one of the archived files is corrupted (no matter bout the verification procedure).
the question is: how to include a "mail" command within a script, so that a short communicate is generated and sent to an address given?
thanks in advance.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2003 08:49 PM
12-17-2003 08:49 PM
Re: how to script a mail command
mailx -s "Here is the subject" me@mydomain.no << EOF
Here is the
text of the mail
It isn't too useful though
EOF
Here is the
text of the mail
It isn't too useful though
EOF
Never preceed any demonstration with anything more predictive than "watch this"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2003 08:52 PM
12-17-2003 08:52 PM
Re: how to script a mail command
Hi,
If its shell scripts, then after the command you can verify the return code which is "$?" check if its not "0" that means the command did not complete successfully and you can then write your action like mailx or send an snmp trap.
If its shell scripts, then after the command you can verify the return code which is "$?" check if its not "0" that means the command did not complete successfully and you can then write your action like mailx or send an snmp trap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2003 09:05 PM
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP