I'm trying to compare the current working directory's path with my home directory's path.
user@machine:~$ echo $PWD
/home/user
user@machine:~$ if ["$PWD" = "/home/user"]; then echo True; else echo False; fi
bash: [/home/user: No such file or directory
False
user@machine:~$ if ["$PWD" = "whatever"]; then echo True; else echo False; fi
bash: [/home/user: No such file or directory
False
I expected it to print True in the second command and False in the third, while not printing bash: [/home/user: No such file or directory. Why is it printing this and how do I get it to work as I wanted to?