問題:
Is it possible to check a bash script syntax without executing it?是否可以在不執行的情況下檢查 bash 腳本語法?
Using Perl, I can run perl -c 'script name'
.使用 Perl,我可以運行perl -c 'script name'
。 Is there any equivalent command for bash scripts? bash 腳本是否有任何等效的命令?
解決方案:
參考一: https://stackoom.com/question/iiy參考二: How do I syntax check a Bash script without running it?