Hello All,
set -x is useful for me to debug my shell scripts but is there any way to make it write to a file instead of it writing to stderr ?? I do not want to have to do an ,
exec 2> logfile
to retrieve the set -x logs. If I do that, the shell script loses the ability to write to its stderr since all stderr messages generated by set -x and ones that I explicity write to stderr goes to the logfile which I do not want. I want the set -x messages to go to a logfile and still be able to write messages to the stderr of this shell script. Is there any way?? Please help!! Thanks in advance.