Ravi Sir's Cards › AWS
[ ] vs [[ ]]?
This interview card answers: [ ] vs [[ ]]? [ ] is POSIX test. [[ ]] is bash: safer, patterns, regex. Regex.
Read card text
What this card says
What it is
[ ] is POSIX test.
Why it matters
[[ ]] is bash: safer, patterns, regex.
How / example
Regex.
[[ $v =~ ^[0-9]+$ ]]