On 2009-02-10, Chet Ramey <chet.ra...@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...



Reply via email to