~/ learn/ comp-325/ cards/ Unquoted variables, command substitution and the exit status
1 of 10

The same variable, globbed and not globbed

The same variable, globbed and not globbed

Answer

name='John*' echo $name echo "$name" ls

In a directory holding John1 and John2, line 2 prints the two filenames and line 3 prints the literal John* — the value never changed, only whether the shell was allowed to glob it.

S&K 3e ch12 §12.3.2

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/6885bf85-010d-40f0-976a-6145020886d1/flashcard utf-8 LF