From 0cc989219b8b69aad317ef221b04cc2f6a749646 Mon Sep 17 00:00:00 2001 From: keramida Date: Fri, 4 Mar 2005 12:40:07 +0000 Subject: Add a section describing the exit status of the shell. Obtained from: NetBSD --- bin/sh/sh.1 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin/sh') diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 862fd02..0abec6e 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -2043,6 +2043,14 @@ Similarly, the .Dq Li set -E ) command can be used to enable a subset of emacs-style command line editing features. +.Sh EXIT STATUS +Errors that are detected by the shell, such as a syntax error, will +cause the shell to exit with a non-zero exit status. +If the shell is not an interactive shell, the execution of the shell +file will be aborted. +Otherwise the shell will return the exit status of the last command +executed, or if the exit builtin is used with a numeric argument, it +will return the argument. .Sh SEE ALSO .Xr builtin 1 , .Xr echo 1 , -- cgit v1.1