In My shell scripts1, It works.:
test1.sh
python main.py
if [[ $? -ne 0 ]]
then
exit
fi
test2.sh
python main.py 2>&1 | tee log.txt
if [[ $? -ne 0 ]]
then
exit
fi
Script 2 is failed. How could I get the return code of python-call main
in test2.sh?