Hi Martin,

On 11/13/24 20:40, Martin D Kealey wrote:
If you need to separate the output of `set -x` from your script's other
output, consider setting BASH_XTRACEFD:

exec 3>> /path/to/xtrace-logfile.txt
BASH_XTRACEFD=3
set -x
source your_file
set +x
exec 3>&-


I didn't know about BASH_XTRACEFD.

In case I'd really need to help users to diagnose their scripts down to the line number I'd use it.


Thank you for this very practical and relevant advise.


Yuri

Reply via email to