Test on exit status of a command

suggest change

Exit status 0 means success. Any other exit status means failure.

To test the exit status of a command:

if command; then
    echo 'success'
else
    echo 'failure'
fi

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents