In a bash script below how do you get and store the return code when you run the python script that has arguments? Am I doing it correctly?
When I run the python script on its own it returns the correct value but when I run it on the script it doesn't print the correct value?
#!/bin/bash
BLOB="cpp.blob"
run_on_hardware_result=$(python3 mcmRunHW.py --blob $BLOB)
echo "run on hardware result is"
echo "$run_on_hardware_result"
exit