sprkd
.io
🗡️ Gauntlet
Courses
Roles
Certs
Coach
Pricing
Sign in
📜
Shell Scripting
1 / 12
Control Flow
Working
Why does
[[ $x == a* ]]
behave differently from
[ $x == a* ]
in Bash?
A
They are identical;
[[ ]]
is just an alias for
[ ]
B
[[ ]]
does pattern matching on the right side and avoids word splitting;
[ ]
globs and splits
C
[ ]
does pattern matching while
[[ ]]
does literal comparison
D
[[ ]]
only works with integers
← Back
Next →