![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error redirection | sais | UNIX for Dummies Questions & Answers | 7 | 05-15-2008 12:28 AM |
| awk two file redirection | kamel.seg | Shell Programming and Scripting | 1 | 12-18-2007 10:17 AM |
| Redirection or piping error message | mariner | Shell Programming and Scripting | 2 | 05-10-2005 12:04 PM |
| .forward file for mail redirection | giannicello | UNIX for Dummies Questions & Answers | 3 | 01-12-2002 07:06 AM |
| File redirection | namtab | UNIX for Dummies Questions & Answers | 4 | 01-10-2002 07:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Error file Redirection
Hello All,
I was wondering is there any other way in Shell Scripting to redirect the errors to a output file inside a shell script with using a error status checking or a command line redirection. Say without doing this ksh test.ksh 2> error.txt or without doing this ... if [ "$?" = "1" ]; then exit 1 fi Thanks Rahul |
| Forum Sponsor | ||
|
|
|
|||
|
My Question is If we need to redirect the error output to a text file in shell script
we can do by using this ksh test.ksh 2> errorfile.txt or We can do a Exit Status check as below .. if [ "$?" = "1" ]; then ... fi But What my doubt is there any other way to redirect the the errors to the error file rather than using the command line redirection to a text file. I want to handling the error redirecting part within the shell script. Thanks in advance Rahul |