On Sun, Dec 12, 2010 at 02:42:08PM +0100, Matthias Andree wrote: >Am 12.12.2010 13:38, schrieb Daniel Colascione: >> On 12/12/10 4:34 AM, Matthias Andree wrote: >>>> [ -f file ] && echo is >>> you cannot run scripts containing this >>> under a "set -e" regime. >> >> Yes you can. >> >> `-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. >> > >Yes, in theory. In practice, I've seen too many shells goof this up.
Maybe in 1986 there was a shell which didn't do this properly under Ultrix. I sincerely doubt that any modern shell has a problem. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple