title: how do I use pipes in a makefile shell command?
body: <p>I have the following code snippet in a Makefile which always fails unless I remove the references to sed &amp; grep below.</p>
  
  <pre><code>TAB=$(shell printf "\t")
  all: abstract.tsv
        $(shell cut -d "${TAB}" -f 3 abstract.tsv | sed "s/^\s*//" | \
          sed "s/\s*$//" | grep -v "^\s*$" | sort -f -S 300M | \
          uniq &gt; referenced_images.sorted.tsv)
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <pre><code>/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
  /bin/bash: -c: line 1: syntax error: unexpected end of file
  </code></pre>
  
  <p>What could be wrong?</p>