title: Get variable type in bash
body: <p>In Python I can get variable type by:</p>
  
  <pre><code>&gt;&gt;&gt; i = 123
  &gt;&gt;&gt; type(i)
  &lt;type 'int'&gt;
  </code></pre>
  
  <p>I saw on <a href="http://tldp.org/LDP/abs/html/untyped.html" rel="noreferrer">this page</a> that there are no variable types in bash. The explanation given is:</p>
  
  <blockquote>
    <p>Untyped variables are both a blessing and a curse. They permit more flexibility in scripting and make it easier to grind out lines of code (and give you enough rope to hang yourself!). However, they likewise permit subtle errors to creep in and encourage sloppy programming habits.</p>
  </blockquote>
  
  <p>But I'm not sure what it means and what are the real advantages (and drawbacks).</p>