This echo
call outputs the variable:
$ FOO="bar" eval 'echo foo: "$FOO"'
foo: bar
But this one does not:
$ FOO="bar" echo foo: "$FOO"
foo:
Why is that? I'm pretty sure I have the single and double quotes right.
Environment-wise, I'm on a MacBook Pro using iTerm2 with a current version of bash
:
$ echo $BASH_VERSION
4.4.23(1)-release