denysdovhan/bash-handbook

Show [[ <conditional> ]] instead of [ <conditional> ]

Leandros opened this issue · 1 comments

In the table where conditionals are explained, [ <condional> ] is shown, but on the top [[ <conditional> ]] is favored.
Stick to [[ <conditional> ]], both are valid, but single brackets behave very differently to double brackets.

Double brackets are a bash feature, and not required by POSIX, while single brackets are required by the POSIX standard.

👍