RETURN

Posted On 2007-05-22 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Linux
Views: 1499


Cause a shell function to exit with the return value n.

SYNTAX
return [n]

Options
n Return value i.e. an errorlevelIf n is not supplied, the return value is the exit status of the last command executed in the function. This may also be used to terminate execution of a script being executed with the . (or source) builtin, returning either n or the exit status of the last command executed within the script as the exit status of the script.

The return status is false if return is used outside a function and not during the execution of a script by . or source.

return is a BOURNE shell command and a POSIX `special'' builtin.


About the Author

FortyPoundHead has posted a total of 1974 articles.


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.224.44.168

Before you can post, you need to prove you are human. If you log in, this test goes away.




Code Links