I tried with a single bracket and it did work at my end. As we are not evaluating any complex expression, so using []command/syntax will work. If the expressions are complex, using the [[]] keyword/syntax could be helpful.
Yes, I noticed that too. The double brackets ([[ ]]) are a Bash-specific feature that offer more flexibility and safer comparisons compared to the older single brackets ([ ]).
In modern scripts, using [[ ]] is generally recommended, so it’s perfectly fine to use them if they’re working better in your lab.