title: Prepending a variable to all items in a bash array
body: <pre><code>CURRENTFILENAMES=( "$(ls $LOC -AFl | sed "1 d" |  grep "[^/]$" | awk '{ print $9 }')" )
  </code></pre>
  
  <p>I have written the above code, however it is not behaving as I expect it to in a for-loop, which I wrote as so</p>
  
  <pre><code>  for a in "$CURRENTFILENAMES"; do
        CURRENTFILEPATHS=( "${LOC}/${a}" )
    done
  </code></pre>
  
  <p>Which I expected to prepend the value in the variable <code>LOC</code> to all of the items in the <code>CURRENTFILENAMES</code> array, however it has just prepended it to the beginning of the array, how can I remedy this?</p>