Bash Set Variable To Exit Code Of The Previous Command