using single or double bracket - bash
When should I use a single bracket?
When should I use double brackets?
Are both POSIX compliant?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
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