title: grep prints random character from bash script to the output file
body: <p>I am not too used to bash script so kindly bear with me
  The following code prints the array in the output file that grep creates. what is it that I am missing?</p>
  <pre><code>ids=(eebab078-6076-4ed7-91bb-624313865380)
  ids+=(cd0b1f5d-2c86-43d4-ad86-b8beef7db4c9)
  
  echo 'start processing'
  for id in ${ids[@]}; do
      echo 'processing' $id
      grep -rih --exclude-dir={reprocessing} $id &gt;&gt; '../result-test.dat' 
  done
  echo 'end processing'
  </code></pre>
  <p>The output looks like this. I am only expecting the search results not the extra ids which is part of the array.</p>
  <pre><code>search results 
  ids=(eebab078-6076-4ed7-91bb-624313865380)
  ids+=(cd0b1f5d-2c86-43d4-ad86-b8beef7db4c9)
  </code></pre>
  <p>Any help will be greatly appreciated</p>