HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: logging in ksh
Operating System - HP-UX
1833883
Members
1840
Online
110063
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
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
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
01-21-2004 08:03 AM
01-21-2004 08:03 AM
logging in ksh
I am writing a script that is being executed by roots crontab and sends the output to a log.
0 0 * * 6 su back -c /home/back/scripts/backup/backup_db.sh > /home/back/log/backup_db.log.`date +\%j`
My problem is is that the script is in ksh, this script call 3 other scripts.
I would like to have all the output emailed to me, (and later, only email if I get an error from any of the scripts that ran).
How do I set logging in backup_db.sh and at the end mail the file.
I am sure there is a better way to do this, but any help would be appreciated.
All the scripts are done in ksh, yes, I would like to go to perl, but, not at this time...
0 0 * * 6 su back -c /home/back/scripts/backup/backup_db.sh > /home/back/log/backup_db.log.`date +\%j`
My problem is is that the script is in ksh, this script call 3 other scripts.
I would like to have all the output emailed to me, (and later, only email if I get an error from any of the scripts that ran).
How do I set logging in backup_db.sh and at the end mail the file.
I am sure there is a better way to do this, but any help would be appreciated.
All the scripts are done in ksh, yes, I would like to go to perl, but, not at this time...
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2004 08:06 AM
01-21-2004 08:06 AM
Re: logging in ksh
Hi,
Looks like this is a duplicate thread to
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=385966
-Sri
Looks like this is a duplicate thread to
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=385966
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2004 08:13 AM
01-21-2004 08:13 AM
Re: logging in ksh
Hi,
as it is now, since you do not redirect stderr, you should get any error messages in an email. Should the scripts cause no errors, you shouldn't get a mail. Who is me, root? Of course you can redirect any output of any command in the scripts to file and later check on, if something is in there and mail it.
greetings,
Michael
as it is now, since you do not redirect stderr, you should get any error messages in an email. Should the scripts cause no errors, you shouldn't get a mail. Who is me, root? Of course you can redirect any output of any command in the scripts to file and later check on, if something is in there and mail it.
greetings,
Michael
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 2025 Hewlett Packard Enterprise Development LP