title: Bash: For loop concatenates results instead of assigning individual lines;
body: <p>This code parses a folder and if the folder contains multiple subfolders/files they are concatenated on ONE line with a space in between (subfolder1 subfolder2 subfolder3 /yo) instead of (subfolder1 /yo) newline (subfolder2 /yo) etc. I need one subfolder per line (it works as expected if there is only ONE subfolder in the directory).</p>
  
  <p>Any suggestions?</p>
  
  <pre><code>FolderName=/yo
  SUBDOMAINS=/data
  
  for sourceX in "$SUBDOMAINS/*"
  do
  echo $sourceX $FolderName
  
  done
  </code></pre>