title: Piping output to cut
body: <p>I am trying to get the name of the shell executing a script.</p>
  
  <p>Why does </p>
  
  <pre><code>echo $(ps | grep $PPID) | cut -d" " -f4
  </code></pre>
  
  <p>work while</p>
  
  <pre><code>echo ps | grep $PPID | cut -d" " -f4
  </code></pre>
  
  <p>does not?</p>