Nooo! Mistake #0 about shell scripting is thinking [ is syntax. It makes it way more weird and inexplicable. [ is a command, just like any other. That's why there needs to be a space between it and the next thing, and why you have to use weird looking flags and such. This is why I prefer the command `test`. It does the same thing as `[`, but is more obviously a command. And when you see it as a command, it's obvious that any command can be used in an if directly; if is just checking the exit code. (Whenever I see someone doing `if [ $? -ne 0 ]`, it makes me cry.)