export variable within `/bin/bash -c`

Viewed 1240

I'm trying to export variable within the /bin/bash -c command.

This results in empty output:

/bin/bash -c "export FOO=foo; echo $FOO"

What would be the proper way to do that?

1 Answers
Related