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 ?
./test.sh: line 10: syntax error near unexpected token
else' ./test.sh: line 10:else '
#!/bin/bash
date
schema=''
table='JJJJ'
first=${table:0:1}
echo $first
if [$first == 'J'] 
echo 'SUCCESS';
else 
echo 'error';
fi
thanks
 
     
    