Shell脚本 - 检查语法

sac*_*hin 5 unix shell

如何在不执行的情况下检查ksh shell脚本中包含的语法的正确性?为了明确我的观点:在perl中我们可以执行命令:

perl -c test_script.pl
Run Code Online (Sandbox Code Playgroud)

检查语法.在ksh中有类似的东西吗?

Gil*_*ert 4

克什-n

大多数 Borne Shell 系列都接受 -n。tcsh 也是如此。