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.
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.