Operating System - HP-UX
1753789
Members
7508
Online
108799
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
Discussions
Discussions
Forums
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
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-04-2008 05:30 PM
тАО12-04-2008 05:30 PM
I do a deployment each week in the following fashion using a for loop :
===================
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
done
=================
how do I make it mail me a notification once its done.
Thanks,
Allan.
===================
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
done
=================
how do I make it mail me a notification once its done.
Thanks,
Allan.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2008 07:03 PM
тАО12-04-2008 07:03 PM
Re: Mail
You could add:
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
- Tags:
- mailx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2008 06:02 AM
тАО12-05-2008 06:02 AM
Re: Mail
Hi Allan:
If you want to wait until the last process is done before sending your notification, do:
#/usr/bin/sh
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
LAST=$!
done
wait ${LAST}
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
Regards!
...JRF...
If you want to wait until the last process is done before sending your notification, do:
#/usr/bin/sh
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
LAST=$!
done
wait ${LAST}
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2008 06:31 AM
тАО12-05-2008 06:31 AM
Solution
HI (again) Allan:
I should hasten to add that in the suggestion I made to wait until the last process completes before sending a mail notification, "last" assumed that all processes complete in order. This is unlikely.
We can wait for all processes by simply doing:
#/usr/bin/sh
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
done
wait #...for all children...
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
Regards!
...JRF...
I should hasten to add that in the suggestion I made to wait until the last process completes before sending a mail notification, "last" assumed that all processes complete in order. This is unlikely.
We can wait for all processes by simply doing:
#/usr/bin/sh
for s in $servers
do
cd /d/$s/
nohup ./cbo.install < /dev/null &
done
wait #...for all children...
echo "Process complete" | mailx -s "Done with XYX" Allan.m@bar.com
Regards!
...JRF...
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP