title: Ampersand inside double quote sed command produces different output
body: <p>Can someone please explain to me why these 3 commands produce different outputs?</p>
  <pre class="lang-sh prettyprint-override"><code>printf &quot;%s&quot;  `echo ../.. | sed 's/[.]/\\&amp;/g'`
  printf &quot;%s&quot; $(echo ../.. | sed 's/[.]/\\&amp;/g')
  printf &quot;%s&quot; &quot;$(echo ../.. | sed 's/[.]/\\&amp;/g')&quot;
  </code></pre>