When make
executes this script, it doesn't pass a variable to the echo, but instead replaces $(foo)
with foo
's value.
So the actual script executed is echo hi...._
(dots are for clarification).
And the white spaces just ignored when parsing the arguments for echo
.
You can put double quotes around to make it output as a string.
echo "$(foo)_"