> 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.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to