I have a question about the invocation of sh with the -e option (exit on error).
Naturally, this option should have exceptions for commands that are themselves
the subject of a test,
and the man page (ksh --??) shows this as:
-e A simple command that has an non-zero exit status will cause the shell to
exit unless the simple
command is:
+ contained in an && or || list.
+ the command immediately following if, while, or until.
+ contained in the pipeline following !.
I don't think item 2 is correctly phrased and this should be:
+ the command immediately preceding 'then' or 'do'.
For an 'if', 'while', or 'until' statement with a list of more than one simple
command
between 'if' and 'then' or 'while'|'until' and do, only the exit status of the
*last*
simple command of the list determines which branch is taken. With the -e
option, I would
expect any non-zero exit status prior to the last simple command in the list to
cause
the shell to exit.
Any comments?
Henk
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users