title: Command inside if statement of bash script
body: <p>I have the following line as part of a much bigger bash script:</p>
  
  <pre><code>if [ `packages/TinySVM-0.09/bin/svm_learn 2&gt;&amp;1| grep TinySVM | wc -l | cut -c0-7 | sed 's/^  *//g'` -eq 1 ] 
  </code></pre>
  
  <p>upon running the script, I get:</p>
  
  <blockquote>
    <p>./install.sh: line 219: [: -eq: unary operator expected</p>
  </blockquote>
  
  <p>Where line 219 is the line above. Any suggestions for a fix?</p>