Try this statement:
exit 1
Replace 1
with appropriate error codes. See also Exit Codes With Special Meanings.
Related Posts:
- How do I split a string on a delimiter in Bash?
- How do I tell if a regular file does not exist in Bash?
- How can I sandbox Python in pure Python?
- Why do you need to put #!/bin/bash at the beginning of a script file?
- How do I parse command line arguments in Bash?
- How can I declare and use Boolean variables in a shell script?
- How can I declare and use Boolean variables in a shell script?
- “[ ]” vs. “[[ ]]” in Bash shell
- How do I split a string on a delimiter in Bash?
- How does “cat << EOF" work in bash?
- Bash scripting missing ‘]’
- How do I compare two string variables in an ‘if’ statement in Bash?
- Meaning of $? (dollar question mark) in shell scripts
- Difference between return and exit in Bash functions
- Bash script: bad interpreter
- How to count lines in a document?
- What does `set -x` do?
- Python script header
- Difference between a script and a program?
- Shell script not running, command not found
- Error handling in Bash
- How do I know the script file name in a Bash script?
- How to determine if a bash variable is empty?
- What is the difference between double and single square brackets in bash?
- What is “-bash: !”: event not found”
- How to make bash scripts print out every command before it executes?
- How can I fully log all bash scripts actions?
- What does passing the -xe parameters to /bin/bash do
- How can I run arbitrarily complex command using sudo over ssh?
- Why use Chef/Puppet over shell scripts?
- How do I deal with a filename that starts with the hyphen (-) character?
- Bash: No such file or directory?
- How do I pause my shell script for a second before continuing?
- Cp: target is not a directory
- Why is “MINGW64” appearing on my Git bash?
- How to split a string into an array in Bash?
- How to create a file in Linux from terminal window? [closed]
- In the shell, what does ” 2>&1 ” mean?
- How to run a PowerShell script
- Is double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
- Extract substring in Bash
- What is the preferred Bash shebang?
- Ubuntu says “bash: ./program Permission denied” [closed]
- Read a file line by line assigning the value to a variable
- How to compare strings in Bash
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- How to decode Seagate’s hard drive date code in a Bash script
- What does export PS1=”\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ ” mean in MacOS’ bash Terminal?
- In the shell, what does ” 2>&1 ” mean?
- How do I use a regex in a shell script?
- How to concatenate string variables in Bash
- -bash: syntax error near unexpected token `)’
- How to grep for case insensitive string in a file?
- An example of how to use getopts in bash
- Select objects based on value of variable in object using jq
- Difference between wait and sleep
- grep –ignore-case –only
- How do I execute a bash script in Terminal?
- Multi-line string with extra space (preserved indentation)
- How to run a PowerShell script
- Installing Homebrew on OS X
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How to make “if not true condition”?
- Multi-line string with extra space (preserved indentation)
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- Bash script and /bin/bash^M: bad interpreter: No such file or directory
- How to mkdir only if a directory does not already exist?
- -bash: syntax error near unexpected token `newline’
- An “and” operator for an “if” statement in Bash
- Loop through an array of strings in Bash?
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- How can I check if a directory exists in a Bash shell script?
- How do I iterate over a range of numbers defined by variables in Bash?
- Echo newline in Bash prints literal \n
- What is $@ in Bash? [duplicate]
- Bash script and /bin/bash^M: bad interpreter: No such file or directory [duplicate]
- Passing parameters to a Bash function
- How to split a string into an array in Bash?
- Pass a password to ssh in pure bash
- How do I iterate over a range of numbers defined by variables in Bash?
- How to run Conda?
- Echo newline in Bash prints literal \n
- What is $@ in Bash?
- How can I use “:” as an AWK field separator?
- How to mkdir only if a directory does not already exist?
- -bash: syntax error near unexpected token `newline’ for display command
- An “and” operator for an “if” statement in Bash
- How to switch Python versions in Terminal?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- “unary operator expected” error in Bash if condition
- “while :” vs. “while true” [duplicate]
- nodemon not working: -bash: nodemon: command not found
- What does “-ne” mean in bash?
- Echo newline in Bash prints literal \n
- “sed” command in bash
- How to reload .bashrc settings without logging out and back in again?
- What is the meaning of 2 in 2> /dev/null
- How to reload .bash_profile from the command line?
- Exit codes in Python
- What is the purpose of “&&” in a shell command?