I need parameter expansion after command substitution.
GNU bash, version 4.1.5(1)
$ foo() { echo \$a; }
$ a=5
$ echo $(foo)
$a
Is it possible?
test:
#!/bin/bash
echo $a
run:
a=5
echo $(./test)
if test:
#!/bin/bash
echo \$a
run:
echo $(./test)
$a
Don't work(