[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 <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
- Question about the return value of 'local', Francis Moreau, 2012/12/13
- Re: Question about the return value of 'local', Andreas Schwab, 2012/12/13
- Re: Question about the return value of 'local', Francis Moreau, 2012/12/13
- Re: Question about the return value of 'local', Chet Ramey, 2012/12/13
- Re: Question about the return value of 'local', Francis Moreau, 2012/12/14
- Re: Question about the return value of 'local', Greg Wooledge, 2012/12/14
- Re: Question about the return value of 'local', Francis Moreau, 2012/12/14
- Re: Question about the return value of 'local', Chet Ramey, 2012/12/14
- Re: Question about the return value of 'local', Chet Ramey, 2012/12/14
- Re: Question about the return value of 'local', Dan Douglas, 2012/12/14
- Re: Question about the return value of 'local', Bill Gradwohl, 2012/12/14