Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
RETURN(1)			  Korn Shell			     RETURN(1)

NAME
       return -	return from a function or dot script

SYNOPSIS
       return [n]

DESCRIPTION
       return  is  a  shell  special  built-in that causes the function	or dot
       script that invokes it to exit.	If return  is  invoked	outside	 of  a
       function	or dot script it is equivalent to exit.

       If  return  is  invoked inside a	function defined with the function re-
       served word syntax, then	any EXIT trap set  within  the	then  function
       will  be	 invoked  in the context of the	caller before the function re-
       turns.

       If n is given it	will be	used to	set the	exit status.

EXIT STATUS
       If n is specified, the exit status is the least significant eight  bits
       of  the	value  of n.  Otherwise, the exit status is the	exit status of
       preceding command.

SEE ALSO
       break(1), exit(1)

AUTHOR
       David J.	Korn, et. al.

COPYRIGHT
       2019, David J. Korn, et.al.

				 Oct 03, 2019			     RETURN(1)

NAME | SYNOPSIS | DESCRIPTION | EXIT STATUS | SEE ALSO | AUTHOR | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=return&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help