title: how to print all variables in bash script?
body: <p>Let's say I have something like this:</p>
  <pre><code>#!/bin/bash
  var1=1
  var2='two'
  third='cat'
  abcd='dog'
  .
  .
  .
  .
  something='else'
  env
  </code></pre>
  <p>Now I want print all variables declared inside my script.<br>
  I tried <code>env</code>, but yea... it prints environment vars not my local ones..<br>
  Also <code>cat /proc/$$/environ</code> doesnot give me what I want as its equal to <code>env</code>.<br>
  Running my script with more debug info <code>bash -x ./myscript.sh</code> does not suit me.<br>
  Is there any trick to list all vars with their values?</p>