Parse a script without executing it.
Section: Invocation and Help
Check script syntax
bash
bash
bash -n script.shExplanation
Good first step before running a script in production or CI.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Invocation and Help