title: What is a simple explanation for how pipes work in Bash?
body: <p>I often use pipes in Bash, e.g.:</p>
  
  <pre><code>dmesg | less
  </code></pre>
  
  <p>Although I know what this outputs, it takes <code>dmesg</code> and lets me scroll through it with <code>less</code>, I do not understand what the <code>|</code> is doing. Is it simply the opposite of <code>&gt;</code>?</p>
  
  <ul>
  <li>Is there a simple, or metaphorical explanation for what <code>|</code> does?</li>
  <li>What goes on when several pipes are used in a single line?</li>
  <li>Is the behavior of pipes consistent everywhere it appears in a Bash script?</li>
  </ul>