title: Bash script - how to fill array?
body: <p>Let's say I have this directory structure:</p>
  
  <pre><code>DIRECTORY:
  
  .........a
  
  .........b
  
  .........c
  
  .........d
  </code></pre>
  
  <p>What I want to do is: I want to store elements of a directory in an array</p>
  
  <p>something like :  <code>array = ls /home/user/DIRECTORY</code></p>
  
  <p>so that <code>array[0]</code> contains name of first file (that is 'a')</p>
  
  <p><code>array[1] == 'b'</code>  etc.</p>
  
  <p>Thanks for help</p>