Hi David!
> A syntax error would be nice instead.
I see - also from you second answer - that you have some fundamental
misunderstandings about shell programming:
- Your code will, in case the testCode fails, try execute a program called
{echo. This is certainly not a good name for a program, but it is not a syntax
error either.
- Since bash interprets the code the problem with the closing brace is only
detected when the offending line is passed.
My personal opinion (although I'll probably be bashed here for it ;-) ): Except
for a very few exceptions like small wrappers avoid writing new shell scripts
at all - for example use python instead. There are many historically founded
flaws and odds with shell proramming.
Anyhow, [email protected] is not the right place for these topics, better try
[email protected].
Best regards
Martin