![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Not able to compile Pro*c file due - give errors and points to /usr/include/.. file | shafi2all | High Level Programming | 0 | 05-09-2008 03:27 AM |
| How to Redirect the error messages from Syslog file to our own Application Log File | balasubramaniam | HP-UX | 3 | 04-17-2008 02:44 PM |
| Redirect output to a file | jimmyc | UNIX for Dummies Questions & Answers | 11 | 01-31-2007 11:34 AM |
| How to redirect std out and std err to same file | 0ktalmagik | Shell Programming and Scripting | 2 | 07-04-2006 08:04 PM |
| redirect output to file | xadamz23 | Shell Programming and Scripting | 4 | 06-29-2006 12:20 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am working on a generic script that will run a shell script with the arguments passed and redirect errors to one file, and all other output to another file. Then if there is anything in the error file it emails the error to me, otherwise it exits. The advantage for this approach is that I won't need to worry about doing error handling in each shell script. I will just know that any errors encountered will get sent to me. How can I set up the redirect to send only errors to the error log and everything else to the log? Code:
${CMDNAME} ${ARGLIST} 1>${LOGFILE} 2>${ERROR_FILE}
Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|