[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange change between bash-3.2 and bash-4.0
From: |
Sitaram Chamarty |
Subject: |
Re: Strange change between bash-3.2 and bash-4.0 |
Date: |
Wed, 11 Feb 2009 08:20:40 +0000 (UTC) |
User-agent: |
slrn/0.9.9 (Linux) |
On 2009-02-10, Chet Ramey <chet.ramey@case.edu> wrote:
> I'm not immediately sure where you got that, but the documentation makes
> it clear:
>
> -e Exit immediately if a simple command (see SHELL GRAMMAR
> above) exits with a non-zero status. The shell does not
> exit if the command that fails is part of the command
> list immediately following a while or until keyword,
> part of the test in an if statement, part of a && or ||
> list, or if the command's return value is being inverted
> via !. A trap on ERR, if set, is executed before the
> shell exits.
Could it perhaps be amended to explicitly exclude pipes,
along with all the other exclusions listed?
Until now I thought a pipe would also cause an exit if it
failed.
In a way, it might have been better if the documentation had
stopped at the first sentence.
But by explicitly listing some exclusions, it made me think
I don't really need to go lookup what precisely is a simple
command.
Just a suggestion...