BASH_XTRACEFD
If set to an integer corresponding to a valid file descriptor,
bash will write the trace output generated when set -x is en‐
abled to that file descriptor. The file descriptor is closed
when BASH_XTRACEFD is unset or assigned a new value. Unsetting
BASH_XTRACEFD or assigning it the empty string causes the trace
output to be sent to the standard error. Note that setting
BASH_XTRACEFD to 2 (the standard error file descriptor) and