I can do the following:
$ FOO="text"
$ echo $FOO
$ text
But how can I wrap it inside bash -c
construct? I tried this but failed:
$ FOO="text"
$ bash -c 'echo $FOO'
$ # return nothing
The reason I ask this because I need to execute another 3rd party code that need to be wrapped inside bash -c