shell還有一個不需要執行腳本只是檢查語法的模式??梢赃@樣使用:
sh -n your_script
這將返回所有語法錯誤。
原文轉自:http://www.anti-gravitydesign.com