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.
set -f(andset +f) options before/after the finalechoto disable globbing/wildcard expansion if this behavior is unwanted.