I am trying to set environment variables from Bash as follow
bash -c 'export FOO=BAR' but when I try to read the previously set variable using
echo $FOO or
bash -c 'echo $FOO' I can see that the variable is not initialized and the command returns an empty line.
How would I be able to set an environment variable from a command line using Bash to make it accessible from the same shell that started the program (i.e.
bash -c 'export FOO=BAR') in a first place ?