On Thu, Dec 13, 2012 at 3:25 PM, Chet Ramey <chet.ramey@case.edu> 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