関連ワード:  capture exit code in shell script  
結果 : print exit code of bash script