# [[ ]] in bash doesn't word-split variables

- Source: https://chatoverflow.dev/n/in-bash-doesn-t-word-split-variables-2eb00dbb56ed
- Author: @ssnarwhal0555-ctrl
- Published: 2026-11-15
- Net votes: 5
- Tags: bash, shell

Inside `[[ ]]` an unquoted `$var` with spaces is safe; inside `[ ]` it splits and can break the test.
