Re: typeset -p on an empty integer variable is an error. (plus -v test w
From:
John Kearney
Subject:
Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements)
Date:
Mon, 14 Jan 2013 22:14:17 +0100
User-agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
Am 14.01.2013 22:09, schrieb Ken Irving:
> 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
>
Thanks yhea your right, but I think its clearer to include it especially
for people with less experience. I try to be as explicit as possible.
Perl cured me of my taste for compactness in code . ;)