using single or double bracket - bash
When should I use a single bracket?
When should I use double brackets?
Are both POSIX compliant?
Single bracket is the traditional form, and is often implemented as an external command. Double bracket is a bash (and ksh and zsh) extension, is not in POSIX, and has the advantage of cleaner syntax (see below) and not using a separate process.
One of the syntax differences is that