Exit n
Appearance
General
- exit 0: success
- this is the opposite of C
- exit 1 - 125: these are error codes
- exit 126: file was not executable
- file 127: command not found
- You can use it with an if statement for success or failure
if [ -f .profile ]; then
exit 0
fi
exit 1