What is the difference between double and single square brackets in bash?
There are several differences. In my opinion, a few of the most important are: [ is a builtin in Bash and many other modern shells. The builtin [ is similar to test with the additional requirement of a closing ]. The builtins [ and test imitate the functionality /bin/[ and /bin/test along with their limitations … Read more