Checking the syntax of a script with -n
suggest changeThe -n flag enables you to check the syntax of a script without having to execute it:
~> $ bash -n testscript.sh
testscript.sh: line 128: unexpected EOF while looking for matching `"'
testscript.sh: line 130: syntax error: unexpected end of file
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents