Bash Script Test If Command Successful