In a Python script a variable that receives the output of a Bash command. When you run the Bash command on Linux or in a script, it works fine. But in the Python script it keeps being assigned to 0. What is wrong?
subprocess.call("bash command", shell=True) is NOT the same as
subprocess.check_output("bash command", shell=True).
The subprocess.call will return a 0 if the Bash command was successful. The subprocess.check_output command will return the output of the Bash command itself.