title: bash-if block not working
body: <p>I have below code.The logic here is if HostList conatains any blanck entry it should set class as blank, else it should be red.Now I am getting error-</p>
  <h2>test.sh[3]: syntax error at line 7 : `then' unexpected</h2>
  <p>can any one help me out?Thanks!!</p>
  <pre><code>     #! /bin/bash
  file=./HostList.txt
  {
    echo &quot;&lt;table&gt;&quot;
    printf &quot;&lt;tr&gt;&quot;
    if[%s -eq =&quot;&quot;]; then
        class=&quot;blank&quot;
    else
      class=&quot;red&quot;
    fi    
      &quot;&lt;td&quot; $class&quot;&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;td&gt;%s&lt;/td&gt;
      &lt;/tr&gt;\n&quot; $(cat &quot;$file&quot;|cut -d'.' -f1)
    echo &quot;&lt;/table&gt;&quot;
  }  &gt; table.html
  
  
  exit 0
  </code></pre>