bug-bash
[Top][All Lists]
Advanced

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

Re: Question about the return value of 'local'


From: Francis Moreau
Subject: Re: Question about the return value of 'local'
Date: Fri, 14 Dec 2012 08:31:32 +0100

On Thu, Dec 13, 2012 at 3:25 PM, Chet Ramey <address@hidden> wrote:
>> Actually I was asking for the case when 'local' is not used:
>>
>>   foo=$(echo bar; false)
>>
>> this assignment expression returns false, and I'm wondering where
>> that's documented.
>
> Look in the SIMPLE COMMAND EXPANSION section of the man page:
>
>        If  there is a command name left after expansion, execution proceeds as
>        described below.  Otherwise, the command exits.  If one of  the  expan-
>        sions  contained a command substitution, the exit status of the command
>        is the exit status of the  last  command  substitution  performed.   If
>        there were no command substitutions, the command exits with a status of
>        zero.
>
> It's the final paragraph.
>

Thanks you.

--
Francis



reply via email to

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