This question already has an answer here:
Is this a Bash bug?
$ mkdir test && cd test && echo "a" > "some.file" test$ echo '*' * test$ TEST=$(echo '*') test$ echo $TEST some.file
Why is the second output the resolution of
* into (all) filenames instead of just a literal
* output? Looks like a bug in Bash?
Tried on Ubuntu 18.04, bash version 4.4.19(1)-release. Expect it will be the same on other OS'es.