Syntax error Cygwin If Else condition
<p>I am using Cygwin to run a script, I am getting syntax error when i use if else condition.
Can you please tell me what is wrong with my script ?</p>

<blockquote>
  <p>./test.sh: line 10: syntax error near unexpected token <code>else'
  ./test.sh: line 10:</code>else '</p>
</blockquote>

<pre><code>#!/bin/bash
date
schema=''
table='JJJJ'
first=${table:0:1}
echo $first
if [$first == 'J'] 
echo 'SUCCESS';
else 
echo 'error';
fi
</code></pre>

<p>thanks</p>