Solaris syntax error: unexpected end of file
Describe
check_shareplex_health.sh: line 123: syntax error: unexpected end of file
Cause
Solaris系統shell指令碼報line 123行,也就是我的指令碼最後一行有錯誤,其實經過檢查,我的指令碼最後一行並沒有語法錯誤。 一般造成此問題有兩種原因: (1)windows編輯器編輯指令碼,格式為dos,行尾換行符與Unix不同,造成此報錯 (2)指令碼使用了EOF或者類似自定義命令輸入,但是EOF結尾時並沒有頂格,有縮排,也會造成此錯誤。
Solution
我的錯誤即第二種情況,修正EOF,將其前面空格或者製表符刪除,使其頂格,問題解決。 如果是第一種情況,可以使用UE 檔案-轉換-dos轉Unix轉換,或者如果Linux平臺安裝了dos2unix命令,也可以使用該命令轉換格式即可。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31439444/viewspace-2672614/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Nginx unexpected end of file 配置證書遇到問題,如何解決?Nginx
- Solaris awk: syntax error near line 1 awk: bailing out near line 1ErrorAI
- pecl PHP Parse error: syntax error, unexpected 'new' (T_NEW) 以及 XML缺失解決辦法PHPErrorXML
- Laravel 8使用 佇列任務出現 「 syntax error, unexpected ')' 」錯誤解決Laravel佇列Error
- PbootCMS 升級後網站打不開,解析錯誤 Parse error: syntax error, unexpected ‘:’, expecting ‘{’怎麼辦boot網站Error
- error unexpected trailing commaErrorAI
- 如何解決"Parse error: syntax error"Error
- 解決:npm install ERR! Unexpected end of JSON inputNPMJSON
- Newline required at end of file but not foundUI
- 【shell 】syntax error in conditional expressionErrorExpress
- Syntax error, unrecognized expression: li[value=]ErrorZedExpress
- npm install “Unexpected end of JSON input while parsing near”問題NPMJSONWhile
- IMP-00009: abnormal end of export fileORMExport
- 帝國CMS提示parse error syntax error的解決方法Error
- npm install 出現 npm ERR! Unexpected end of JSON input while parsing near '...ostNPMJSONWhile
- 如何解決"You have an error in your SQL syntax"ErrorSQL
- 解決 eslint 的 Parsing error: Unexpected token 錯誤EsLintError
- 【故障處理】ORA-3113 "end of file on communication channel"
- springBoot+mvc專案:unexpected error(type=Not Acceptable,stauts=-406)Spring BootMVCError
- ORA-03113: end-of-file on communication channel 解決方法
- 萬能方法解決——You have an error in your SQL syntaxErrorSQL
- ubuntu下pig報錯ERROR 2999: Unexpected internal error. Failed to create DataStorage的解決UbuntuErrorAIAST
- 執行py檔案 File "<stdin>", line 1 SyntaxError: invalid syntaxError
- 記錄某次解決`Okhttp java.io.EOFException: \n not found: size=0 content= unexpected endHTTPJavaException
- Android:Unexpected lock protocol found in lock file. Expected 3, found 0.AndroidProtocol
- Binary XML file line #2: Error inflatingXMLError
- psql: error: could not connect to server: No such file or directorySQLErrorServer
- Oracle啟動報錯:ORA-03113: end-of-file on communication channelOracle
- fatal error: libmemcached/memcached.h: No such file or directoryErrorIBM
- fatal error: openssl/sha.h: No such file or directoryError
- fatal error: sys/cdefs.h: No such file or directoryError
- 執行遷移檔案報錯: Syntax error or access violation: 1166 ...Error
- 360 Atals:Cause: java.sql.SQLException: Proxy Warning - near “status“: syntax errorJavaSQLExceptionError
- Syntax Error: ValidationError: Invalid options object. Stylus Loader has been initialized using anErrorObjectZed
- 解決laravel出現Syntax error or access violation: 1055 ‘***‘ isn‘t in GROUP BYLaravelError
- error: #error This file requires compiler and library support for the ISO C++ 2011 standard.ErrorUICompileC++
- pbootcms模板 後臺升級程式後導致網站打不開 Parse error: syntax error, unexpecboot網站Error
- eclipse 引入外部js檔案報Syntax error on token 錯解決方案EclipseJSError