Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solaris syntax error: unexpected end of file

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Describe

Check_shareplex_health.sh: line 123: syntax error: unexpected end of file

Cause

Solaris system shell footer line 123line, that is, the last line of my script has an error, in fact, after checking, the last line of my script has no syntax errors. Generally, there are two reasons for this problem: (1) the windows editor edits the script in the format of dos, and the line feed at the end of the line is different from Unix, which causes this error. (2) the script uses EOF or similar custom command input, but there is no ceiling at the end of EOF, there is indentation, which will also cause this error.

Solution

My mistake is the second case, fix EOF, delete the space or tab in front of it, make it top, and the problem is solved. In the first case, you can use UE file-convert-dos to Unix conversion, or if the Linux platform has the dos2unix command installed, you can also use this command to convert the format.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 203

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report