I have read Trying to embed newline in a variable in bash and I think I understand about the newline as the IFS, and how bash changes newlines into spaces at times, but I don't understand this situation:
[prompt]$ blah="$(printf "hi\n\n\n\n")"
[prompt]$ echo "$blah"
hi
[prompt]$ blah="$(printf "hi\n\n\n\nx")"
[prompt]$ echo "$blah"
hi
x
Why did the first echo not spit out a bunch of newlines? Thanks.