title: saving return code and returning it in bash
body: <p>I'd like to do this in bash</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  
  func(){
      return 1;
  }
  
  e=func
  echo some text
  exit e
  </code></pre>
  
  <p>but I'm getting</p>
  
  <pre><code>exit: func: numeric argument required
  </code></pre>
  
  <p>AFAIK variables in bash are without a type, how to "convert" it to int to satisfy requirement?</p>