Bash script how to end script?
1

Asked By: Christophe Schinner
Date created: Thu, May 20, 2021 8:19 PM
Date updated: Wed, Jul 20, 2022 4:40 AM
Content
Video answer: Exit status code of a command

Top best answers to the question «Bash script how to end script»
- Bash provides a command to exit a script if errors occur, the exit command. The argument N (exit status) can be passed to the exit command to indicate if a script is executed successfully (N = 0) or unsuccessfully (N != 0). If N is omitted the exit command takes the exit status of the last command executed.
Video answer: Bash exit codes & command chaining

Video answer: Shell script continue based on exit code
