title: Changing the value of a variable inside a function
body: <p>I am wondering how to return an array from a function in bash</p>
  
  <pre><code>array[0]=0
  array[1]=0
  array[2]=0
  
  function change {
  
       array[0]=1
       array[1]=2
       array[2]=3
  
  }
  </code></pre>
  
  <p>However this does not work (all elements of array are still 0)
  thanks for help</p>