A colleague recently introduced me to
bash -x for debugging my bash scripts without taking the
echo $foo route.
$ bash -x hello-world.sh + echo 'Hello World' Hello World
Internally -- how does bash accomplish this? I checked
man bash and it (didn't seem to?) mention the
-x flag when invoking the interpreter. I'm mainly looking for an overview of what will and won't be debugged in the
-x enviornment, or any other gotchas.