logo
  • 教程列表
  • SO官方文档
  • 调试
    • 使用 -n 检查脚本的语法
    • 调试 usigh bashdb
    • 使用 -x 调试 bash 脚本
  1. StackOverflow 文档
  2. Bash 教程
  3. 调试
  4. 使用 -n 检查脚本的语法

使用 -n 检查脚本的语法

Created: November-22, 2018

使用 -n 标志可以检查脚本的语法,而无需执行它:

~> $ bash -n testscript.sh
testscript.sh: line 128: unexpected EOF while looking for matching `"'
testscript.sh: line 130: syntax error: unexpected end of file
  • 调试 usigh bashdb
  • 调试

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明