如何在不運行 Bash 腳本的情況下對其進行語法檢查? - How do I syntax check a Bash script without running it?

問題:

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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章