bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit-on-error option does not work as expected


From: Andreas Schwab
Subject: Re: Exit-on-error option does not work as expected
Date: Tue, 17 Jul 2007 18:15:25 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

address@hidden writes:

>         archive_item && delete_item

Only simple commands cause the shell to exit on error with -e.  But the
commands in the function archive_item are part of a && list.

    `-e'
          Exit immediately if a simple command (*note Simple
          Commands::) exits with a non-zero status, unless 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 status is being inverted using `!'.  A trap on `ERR',
          if set, is executed before the shell exits.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]