title: Displaying all the variables declared in a sh file
body: <p>I have a test.sh file which contains something like the following</p>
  
  <pre><code>source lib.sh
  
  input=$0
  
  A=aa/bb/cc
  B=$A/dd
  C=$A/ee
  
  doSomething $B $C
  </code></pre>
  
  <p>Is it possible to display the values of all the variables so that when I read the code, I don't have to trace their final value row by row.</p>
  
  <p>In my case, I mean to display</p>
  
  <pre><code>input=$0 
  A=aa/bb/cc
  B=aa/bb/cc/dd
  C=aa/bb/cc/ee
  </code></pre>
  
  <p>I know </p>
  
  <pre><code>bash -x test.sh
  </code></pre>
  
  <p>can achieve this goal; but I don't want test.sh to be executed. ( Executing the functions in test.sh would delete some important files on my disk.) I only want to know the values of all the variables.</p>