Bash doesn't perform word splitting in globbing in these cases:
LHS or RHS of an assignment, except for indexed arrays
var=$value # simple variable declare -A hash key="key with a space" hash[$key]=$value # index of an associative array arr=$(echo "1 2 3") # word splitting does happen here
var="one two" if [[ $var = *" "* ]]; then ... # check if var has a space in it if [[ $(echo "one two") = $var ]]; then # use the output of command substitution to compare with var
((sum = $(echo "99 + 1"))) # assigns 100 to sum
cat <<< * # gives '*' as the output
Is there a definite list of cases where Bash does or doesn't perform word splitting and globbing?