exit

exit from the KornShell 

KornShell Built-in


SYNOPSIS

exit [expression]


DESCRIPTION

exit terminates the KornShell. If there is an expression, the value of the expression is the exit status of the shell.

On a POSIX-compliant system, the value of expression should be between 0 and 255. The exit command raises the EXIT trap, unless exit is being invoked inside an EXIT trap.


DIAGNOSTICS

exit returns the value of the arithmetic expression to the parent process as the exit status of the shell. If you omit expression, it returns the exit status of the last command executed.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.

Allowing an expression rather than just a number is an extension found in the KornShell.


NOTE

This is a special built-in command of the MKS KornShell. The exit command provided with PTC MKS Toolkit should not be confused with the internal exit command on Windows systems.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Windchill Requirements and Validation


SEE ALSO

Commands:
return, sh


PTC MKS Toolkit 10.4 Documentation Build 39.