Anssi Saari wrote:
Bash manual explicitly states command substition (the $(...) structure) replaces the command with the standard *output* of the command.
Another problem is your use of '&' here: sensor_data=$(python execute_sensor_process.py) & The '&' causes the whole command, including the variable assignment, to be executed in a subshell. So the variable is only bound in the subshell process and won't be seen from the main shell process. Running the command in the background here is pointless, since if the shell script needs the variable value for subsequent processing it will have to wait for the command to finish. So just get rid of the '&'. -- Greg -- https://mail.python.org/mailman/listinfo/python-list