You would still get the warnings if you redeirected STDERR to STDOUT but if you trust the called script to exit non-zero when it fails then you no longer need to examine STDERR. You can throw it away with 2>&/dev/null and just test the exit value from the script.
Fixing the warnings may also help ;-)
The bad interpreter error would also return a non-zero value to the calling script and get caught in the $? test.
Cheers,
R.
In reply to Re^3: Error trapping while capturing stdout
by Random_Walk
in thread Error trapping while capturing stdout
by ccarden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |