[is a command (basically a variant of thetestcommand).[[is a builtin in many shells.- When you write
foo*inside[...], filename expansion (aka globbing) occurs; while inside[[...]]pattern matching occurs. [[is more powerful and capable than[but should not be used if portability is a concern.[and[[are not part of theifsyntax, you can use them as in[ "$exit" = 'yes' ] && exit.- Inside
[...]you should prefer=instead of==. As far as I know, the second one is accepted in many shells but is not POSIX-compliant.
By the way, I recommend you to double-quote your variables even if you really know how word splitting will behave.