Issue
Suppose I have a complex bash script:
x.sh
#! /bin/bash
. include/this/script.sh
. include/this/other/script.sh
...
foo="foo$bar"
echo $foo
Is there some setting or way to cause BASH to echo all the source code it sources, including the main script when I invoke it, so I know exactly what is going on?
Solution
The proper way, without debugging garbage:
set -v
. include/this/script.sh
. include/this/other/script.sh
Answered By - Gilles Quénot Answer Checked By - Senaida (WPSolving Volunteer)