How to Fail a Shell Script Programmatically

Embed Size (px)

Citation preview

  • 7/22/2019 How to Fail a Shell Script Programmatically

    1/1

    How to fail a shell script programmatically?Just put an [exit] command in the shell script with return value other than 0. this is because the exit codes of successful Unix programs is zero. So, suppose if you write

    exit -1inside your program, then your program will thrown an error and exit immediately.