title: How to define a function inside another function in Bash?
body: <p>I have the following code  </p>
  
  <pre><code>func1(){
      #some function thing
      function2(){
          #second function thing
      }
  }
  </code></pre>
  
  <p>and I want to call <code>function2</code> but I get an error <code>function2 : not found</code></p>
  
  <p>Is there a solution?</p>