AI engineering glossary · Command line Git
What is exit status?
Exit status (also called Exit code, Return code): A small number a program returns when it finishes: 0 signals success and any other value signals a failure kind. The shell stores it in the variable $?, and scripts or CI systems use it to decide whether to continue.
Exit status: an example
After grep -q hello file.txt, echo $? prints 0 if the word was found and 1 if not.
Related terms
More Command line Git terms
Where you learn it
Exit status is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.