title: how to return an array from a script in Bash?
body: <p>suppose I have a script called 'Hello'. something like:</p>
  
  <pre><code>array[0]="hello world"
  array[1]="goodbye world"
  echo ${array[*]}
  </code></pre>
  
  <p>and I want to do something like this in another script:</p>
  
  <pre><code>tmp=(`Hello`)
  </code></pre>
  
  <p>the result I need is:</p>
  
  <pre><code>echo ${tmp[0]}  #prints "hello world"
  echo ${tmp[1]}  #prints "goodbye world"
  </code></pre>
  
  <p>instead I get</p>
  
  <pre><code>echo ${tmp[0]}  #prints "hello"
  echo ${tmp[1]}  #prints "world"
  </code></pre>
  
  <p>or in other words, every word is put in a different spot in the tmp array.
  how do I get the result I need? </p>