I'm running this script under MacOS X Darwin. The script above, when executed, prints "Match" ... although I'm fairly certain that CHECKA and CHECKB are different. If I remove the last space in the IF brackets, ie:

if [ CHECKA=CHECKB ]; then

becomes:

if [ CHECKA=CHECKB]; then

Then it prints "No match", and cannot be coaxed into printing "Match", even when I use: