Re: About the "return" build-in function in ksh
bsh_at_iname.com
Date: 07/13/04
- Next message: John W. Krahn: "Re: Shell scripts and the SMTP protocol"
- Previous message: bsh_at_iname.com: "Re: mktime equivelant for shell"
- In reply to: 0la 0.: "Re: About the "return" build-in function in ksh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Jul 2004 18:13:51 -0700
"0la 0." <mail_less@127.0.0.1> wrote in message news:<zEYFc.4257$dx3.33599@newsb.telia.net>...
> mrby wrote:
> > From the man page:
> > "return [status]
> > ...
Mind that the behavior of the return builtin is extended in ksh93:
"return [n] :
Causes a shell function or '. script' to return to the invoking
^^^^^^^^^^^^^
script with the exit status specified by n. The value will be
the least significant 8 bits of the specified status. If n is
omitted, then the return status is that of the last command
executed. If return is invoked while not in a function or a
'. script', then it behaves the same as exit."
This is done as a consequence of allowing functions to be called
as arguments to ".", with identical behavior and invocation syntax,
as if a file-name were supplied instead.
=Brian
- Next message: John W. Krahn: "Re: Shell scripts and the SMTP protocol"
- Previous message: bsh_at_iname.com: "Re: mktime equivelant for shell"
- In reply to: 0la 0.: "Re: About the "return" build-in function in ksh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|