Hi Akim, Jim.

Just a minor correction about your "set -e" interpretation ...

On 07/05/2012 04:53 PM, Jim Meyering wrote:
> Akim Demaille wrote:
>> Le 5 juil. 2012 à 15:24, Akim Demaille a écrit :
>>
>>>    test "$(sed -n 3p NEWS)" = "$noteworthy_stub" \
>>>      && die 'line 3 of NEWS looks fishy!'
>>
>> Well, while I agree in general, I don't have the same
>> feeling in this case, for two reasons.  The first one
>> being that under set -e, && propagate the failure,
>> and the script will die.  || is safer than && when
> 
> This script doesn't use set -e.
> I'd say that having to limit such use of "&&" is a good reason
> not to use "set -e".
>
But "false && something" causes no problem under "set -e":

    $ sh -e -c 'false && exit 1; echo OK'
    OK

otherwise about one third of the Automake testsuite would spuriously
fail with regularity :-)

And I'm pretty sure that POSIX mandates this behaviour somewhere...

Regards,
  Stefano

Reply via email to