title: Passing (and executing) a quoted command pipeline as a function argument
body: <p>Today I encountered something quite strange</p>
  <p>I have two scripts:</p>
  <p>wrong.sh:</p>
  <pre><code>execute()
  { 
          ${@}
  }
  
  execute &quot;ls -l | less&quot;
  </code></pre>
  <p>right.sh:</p>
  <pre><code>execute()
  { 
          ${@}
  }
  
  execute ls -l | less
  </code></pre>
  <p>Running <code>sh wrong.sh</code> gives the following output:</p>
  <pre><code>ls: less: No such file or directory
  ls: |: No such file or directory
  </code></pre>
  <p>While running <code>sh right.sh</code> gives me the same thing as running <code>ls -l | less</code></p>
  <p>May I know:
  (1) While running <code>sh wrong.sh</code> will give me that wrong output
  (2) How to modify the <code>execute</code> function so that running <code>sh wrong.sh</code> will gives me the same thing as running <code>ls -l | less</code></p>