A simple test which doesn't work.
then echo hey
The error message.
bash: [10==10]: command not found
bash-4.1$ bash --version
GNU bash, version 4.1.7(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Checked for syntax online which seems to suggest that I'm using the correct syntax. Bash syntax is annoying
Nevermind found the solution myself.
if [$x==10] should be rewritten as if [ $x -eq 10 ]