Is it possible to check a bash script syntax without executing it?
Using Perl, I can run perl -c \'script name\'. Is there any equivalent command for ba
perl -c \'script name\'
I actually check all bash scripts in current dir for syntax errors WITHOUT running them using find tool:
find
Example:
find . -name '*.sh' -exec bash -n {} \;
If you want to use it for a single file, just edit the wildcard with the name of the file.