background img
banner
Sep 26, 2011
211 Views
0 0

Exit status

Written by
banner

By default in Linux if particular command/shell script is executed, it return two type of values which is used to see whether command or shell script executed is successful or not.

(1) If return value is zero (0), command is successful.
(2) If return value is nonzero, command is not successful or some sort of error executing command/shell script.

This value is know as Exit Status.

exit status can be found out by issuing $ echo $?

if the output is 0, the previously executed command is successful if it’s a non zero value means the last command run is unsuccessful.

 

Article Categories:
Shell script
banner

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.