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
02-18-2003 03:30 AM
02-18-2003 03:30 AM
I'm trying to make a root's cron scheduled script with the following features:
1.- Redirect default the cron of root's mail output to a specific file.
2.- Take the final command fbackup status ($?) to evaluate a specific action inside of the script.
I'm doing this by the following piped commands:
fbackup -0 -v -i / -f /dev/rmt/0m 2>&1|tee /
STATUS=$?
With this I am achieving redirect the cron fbackup output to /
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 03:44 AM
02-18-2003 03:44 AM
Re: fbackup
I think the easy way out of this problem is to remove the tee command and just redirect the output of fbackup to a file, ie:
fbackup -0 -v -i / -f /dev/rmt/0m 2>&1 >whatever
STATUS=$?
This allows STATUS to reflect fbackup's return code. Tee does 2 things, it sends stdin to the output file plus it also sends stdin to stdout, which I don't believe is needed here.
regards,
Darren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 04:46 AM
02-18-2003 04:46 AM
Re: fbackup
I've tried your recomendation before, but didn't work fine, the file "whatever" just is created with cero file size. Just try with a little test situation, i.e:
fbackup -0 -v -i /
The $? variable are ok but /tmp/fback.log is empty!
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 05:59 AM
02-18-2003 05:59 AM
Solution*All* messages, i.e. both normal and error messages go to standard error, so you only have to re-direct standard error, i.e. "2>/path/somefile".
Note: tar and cpio also do this, and so does *frecover* just for 'symmetry'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 04:01 PM
02-18-2003 04:01 PM
Re: fbackup
hope this works for you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 04:10 PM
02-18-2003 04:10 PM
Re: fbackup
HTH
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 11:34 PM
02-18-2003 11:34 PM