Solaris Korn Shell Scripting

I have made the following simple script:

a=0
let a=$a+1
if [["$a"="1]"]
then mailx -s "Up" abc@yahoo.com
fi

When I run the above script, I get the following error:

# ./new.ksh
./new.ksh[3]: [[1=1]]: not found.

Please tell me how to use if here?

here is the error

if [["$a"="1]"]

re-write it as

if [[ "$a" = "1" ]] ; then

The error suggests a problem at line 3.

Look at line 3. There is 1 going on 5 problems there (depending on whether you typed it in, or pasted it).

Thanks.
Actually that was a typo... Now I made the changes, now the script is running. But it keeps on running and I have to kill it. After killing once it shows the following messgae:

# ./new.ksh

(Interrupt -- one more to kill letter)

When I kill again, then I get the hash prompt back.

The second Ctrl-C is necessary to interrupt mailx which was invoked by your script.

To tell mailx that we have finished typing the mail body we send it just a line feed. This should stop your script hanging if all you want to do is send an email with the subject line "Up" and no mail body.

echo "" | mailx -s "Up" abc@yahoo.com

Thanks all for the help. Its working fine now.