title: Bash: Why is echo adding extra space?
body: <p>I get:</p>
  
  <pre><code>$ echo -e "D"{a,b,c}".jpg\n"
  Da.jpg
   Db.jpg
   Dc.jpg
  </code></pre>
  
  <p>Note: The extra spaces before Db and Dc on the 2nd and 3rd line of the output.</p>
  
  <p>Why are these there?</p>
  
  <p>Thanks,
  Dan</p>
  
  <p><strong>Edit</strong>: Since my actual objective had spaces in it (which I should have written originally):</p>
  
  <pre><code>echo -e "Name"{,.}" "{-,}"extra"{,so}" 5v5 "{one,two,No\ four}{,!,\!\!}"\n"
  </code></pre>
  
  <p>Most solutions here didn't work for me (for loop, xarg, tr).  Printf didn't work because of multiple braces expansions that I want to cantesian product.</p>
  
  <p>I combined 3 solutions (mletterle's \b, Dennis Williamson's extra space, and Jim Dennis's using far less quotes) to get:</p>
  
  <pre><code>echo -e "" \\bName{,.}\ {-,}extra{,so}\ 5v5\ {one,two,No\ four}{,\!,\!\!}\\n
  </code></pre>
  
  <p>Thanks all who answered!  I learned a lot from your responses!</p>
  
  <p>Dan</p>