Changes

Jump to navigation Jump to search
no edit summary
Line 2: Line 2:  
|previous=Create usage messages
 
|previous=Create usage messages
 
|next=The case statement}}
 
|next=The case statement}}
 +
 
Sometimes we need to stop the execution of our script when a condition is satisfied. For example, if tar command not installed, stop the execution of our shell script. We can also take action based on the exit code of the command. Say if ping command is successful, continue with script or exit with an error. Let us see how to use the exit command and the exit statuses in our scripts.
 
Sometimes we need to stop the execution of our script when a condition is satisfied. For example, if tar command not installed, stop the execution of our shell script. We can also take action based on the exit code of the command. Say if ping command is successful, continue with script or exit with an error. Let us see how to use the exit command and the exit statuses in our scripts.
 
==Purpose==
 
==Purpose==

Navigation menu