- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sending a mail after script exec
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
07-25-2003 05:10 AM
07-25-2003 05:10 AM
I want to send myself (on a remote maschine) a mail which contains the logfile which a script written by me produces. How can I do it? I played around with mail and mailx but I can not understand how to proceed.
Thanks for help.
Best Regards, Oliver
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:14 AM
07-25-2003 05:14 AM
Re: Sending a mail after script exec
mailx me@.com < scriptlog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:15 AM
07-25-2003 05:15 AM
Re: Sending a mail after script exec
One way:
# mailx -s "LogFile" root@server.xyz.com < /var/adm/syslog/syslog.log
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:16 AM
07-25-2003 05:16 AM
Re: Sending a mail after script exec
From one of our scripts ... (you'll have to fill in the variables ;-)
( echo "$errorswarm ($swarmbackup)\n\n\n"; cat $ERRORCODES; echo " ";cat $LOGFILETEMP ) |
mailx -s "$errorswarm ($swarmbackup)" $MAILERRORS
Regards,
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:16 AM
07-25-2003 05:16 AM
Re: Sending a mail after script exec
Here's an example
cat logile | mailx -s "Your Subject Here" username@company.com
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 05:18 AM
07-25-2003 05:18 AM
Re: Sending a mail after script exec
This should do it for you.
./your_script > /tmp/logfile; mailx -s "script_log" name@domain.net < /tmp/logfile
Or you could just add the mailx command to the end of your script.
Regards,
Tom