bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: typeset -p on an empty integer variable is an error. (plus -v test w


From: Ken Irving
Subject: Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements)
Date: Mon, 14 Jan 2013 12:09:17 -0900
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Jan 14, 2013 at 08:57:41PM +0100, John Kearney wrote:
> ...
> btw
> || return $?
> 
> isn't actually error checking its error propagation.

Also btw, I think you can omit the $? in this case;  from bash(1):

    return [n]
        ...
        If n is omitted, the return status is that of the  last  command
        executed  in the function body.  ...

and similarly for exit:

    exit [n]
        ...  If  n  is  omitted,
        the exit status is that of the last command executed.  ...

Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]