mirror of https://github.com/tLDP/LDP
17 lines
499 B
Bash
17 lines
499 B
Bash
#!/bin/bash
|
|
|
|
echo hello
|
|
echo $? # Exit status 0 returned because command executed successfully.
|
|
|
|
lskdf # Unrecognized command.
|
|
echo $? # Non-zero exit status returned -- command failed to execute.
|
|
|
|
echo
|
|
|
|
exit 113 # Will return 113 to shell.
|
|
# To verify this, type "echo $?" after script terminates.
|
|
|
|
# By convention, an 'exit 0' indicates success,
|
|
#+ while a non-zero exit value means an error or anomalous condition.
|
|
# See the "Exit Codes With Special Meanings" appendix.
|