if [[ $? -ne 0 ]]; then # -ne: not equal if ! [[ $? -eq 0 ]]; then # -eq: equal if [[ ! $? -eq 0 ]]; then