title: Bash: Copying files with xargs. Why do I get this returned as the last argument by xargs?
body: <p>I have copied some files from one user-account to a new one by these commands</p>
  <pre><code>$ folders_array=(.mozilla .thunderbird .ssh .eclipse)
  
  $ echo ${folders_array[@]} | xargs -d &quot; &quot; -I _ sudo cp -r _ /home/nebukadnexa/
  </code></pre>
  <p>I can't explain the form of the last argument <code>.eclipse</code> which is, that it is <code>'.eclipse'$'\n'</code> and thus wasn't found in my current home directory and thus also wasn't copied of course.</p>
  <p>Can you point me to how xargs produces the argument <code>'.eclipse'$'\n'</code> (being the last argument)?</p>
  <p>EDIT: Maybe a better solution than <code>-d &quot; &quot;</code> is <code>tr &quot; &quot; &quot;\n&quot;</code> ?</p>
  <pre><code>echo ${folders_array[@]} | tr &quot; &quot; &quot;\n&quot; | xargs -I _ printf &quot;%s\n&quot; _
  </code></pre>