Bash Assign Command Exit Code To Variable Cost