title: Running sed on string, benefit of using "echo" + "pipe" over "<<<"
body: <p>Commonly I see people manipulating strings using sed as follows:</p>
  
  <pre><code>echo "./asdf" | sed -n -e "s%./%%p"
  </code></pre>
  
  <p>I recently learned I can also do:</p>
  
  <pre><code>sed -n -e "s%./%%p" &lt;&lt;&lt; "./asdf"
  </code></pre>
  
  <p>Is there a reason to avoid the latter?
  For instance, is it bash-specific behaviour?</p>