Marc Weber wrote:

> This is my point: I'd like to tell bash: Whenever running an executable
> assume that if it returns a non zero exit status that's a unforeseen
> exception. And in this case don't continue as usual but abort and return
> non zero exit status yourself. set -e comes close.

You're talking about making bash exit when a command fails even when
not in a command execution context.  The example above is a word
expansion context.  `set -e' acts in a command execution context.

Nor are you talking only about executables; you mean builtins too,
just to make that clear.

Your proposal would have bash exit on

echo `expr $var - 1`

if `var' happened to be 1.  (That construct is very common in older shell
code.)

I don't think that extension would be useful enough to be worth the
effort.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to