title: Shell STDIN redirection of three backticks
body: <h1>Motivation</h1>
  
  <p>I have a Markdown backtick codeblock and I would like to insert it into a list item.  I tried using awk with STDIN redirection for fun.  I ran into the following problem.</p>
  
  <h1>Problem</h1>
  
  <p>I adapted from <a href="https://www.tutorialspoint.com/unix/unix-io-redirections.htm" rel="nofollow noreferrer">Tutorials Point</a>'s example to count the number of lines of a Markdown codeblock.</p>
  
  <pre><code>$ wc -l &lt;&lt; EOF
  ```
  codeblock
  ```
  EOF
  </code></pre>
  
  <ul>
  <li>Expected output: <code>3</code></li>
  <li><p>Actual output:</p>
  
  <pre><code>zsh: command not found: codeblock
  1
  </code></pre></li>
  </ul>
  
  <p>How to get the shell parse an odd number of backticks in STDIN?</p>
  
  <p>Thanks for reading.</p>