EDIT: This question was marked as duplicate. While this might be true on a larger scale, the answer provided by Kusalananda gave me a better understanding of my options.
If a syntax error inside a shell script happens, the interpretation of the script isn't necessarily terminated but simply continues at the next line of the script. Is there a way to catch the number of those syntax errors while the script is interpreted?
I would really like to have something like a compiler report, stating the number of errors and warnings after the compiling has finished. Just for linux shell.
set -e
at the start of your script so that the script does terminate when an error happens, which is probably a better way of debugging/testing your script than just "counting the number of errors". – Malte Skoruppa Jul 01 '16 at 10:29