Is there any way to export all the output of set -x
to a file?
my exercise is to use set -x
do some functions like mkdir
and touch
and export all the output to a file.
Thanks
$ (set -x; echo hello) &> foo.txt
$ cat foo.txt
+ echo hello
hello