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

  • 關於本站
  • 免責聲明