Checking the syntax of a script with -n

suggest change

The -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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents