title: bash: set array env variable and de-referencing it from any shell script fails
body: <p>I set the a array as an environment variable in this manner
   eg. script <code>test.sh</code></p>
  
  <p>in test.sh</p>
  
  <pre><code>#!/bin/bash
  export STRING=( "str1" "str2" )
  </code></pre>
  
  <p>source test.sh</p>
  
  <p>now in script <code>test-1.sh</code></p>
  
  <pre><code>#!/bin/bash
  echo ${STRING[0]}
  </code></pre>
  
  <p>the response is nothing, just a blank line,
    whereas, if I try to set <code>STRING="str1"</code> in test.sh
    and do <code>echo $STRING</code> in <code>test-1.sh</code>, this works.</p>
  
  <p>tests are executed from root user only,
    Now how to set array as env variable , so that I can call the elements of array as per requirement? Earlier, I have tried to even modify <code>/etc/bashrc</code> and that also didn't result in anything positive.</p>
  
  <p>I need to set the array as env variable as there may be many scripts that i have to write which shall use these variable settings.</p>
  
  <p>can anybody provide me suggestions to correct me where I am doing wrong?</p>