I'm calling a Python script from my bash script and I need the result from said Python scripts computation. I've tried to do it by setting an environment variable in several ways, one being the answer in this question and one being like so:
table_name = get_table_name(feed)
subprocess.Popen(['export', 'TABLE_NAME='+table_name], shell=True)
I call the Python script from my bash file like so:
./auto_load.py FEED-NAME 2017-09-07
echo "Table name is" ${TABLE_NAME}
Since the environment variable is created from a process triggered by the bash script, shouldn't it be available in the bash script?