3 ms·
What was the surprising part about echo '*' echo "*" ? Both prints an asterisk. Is '*' some sort of BASH variable?
by wodenokoto 9y ago
What was the surprising part about
echo '*'
echo "*"
? Both prints an asterisk. Is '*' some sort of BASH variable?
- Sniffnoy 9y agoThe asterisk * is a glob. Since double-quotes allow variables inside to be dereferenced rather than always quoting everything literally, presumably he was expecting that double-quotes might still allow globs to work rather than causing them to be quoted, when in fact all quotes will quote globs whether single or double. So he was expecting it might print out "a".