In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the solution that the shell script prepared by Notepad++ can not be executed under linux. It has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Notepad++ is a free and open source code editor in Windows environment, supported languages: C, C++, Java, Clippers, XML, HTML, PHP, Javascript!
This article is to explain to you that the shell script developed by notepad++ under windows is uploaded to linux to solve the problem (bom problem), which can be referenced by interested students.
Problem description:
In the process of debugging a shell statement, it is found that there are no errors when the shell copied from the notepad++ text is executed by Linux! However, when uploading the shell script written by notepad to the Linux system for debugging, an error was reported that the command could not be found! If you think about it, the root of the problem must be on Nodepad++. After looking for the cause, it turns out that it is the problem of format conversion.
1. View the current text format
In the Notepad++ interface, there is a file format description in the lower right corner: "Dos\ Windows or UNIX or Mac".
2. File conversion method
But if you need to convert every shell file in this way, it can be troublesome, is there a way to do it once and for all?
The answer is yes. We can set Notepad++ to create new files in shell format by default, as follows:
Open the settings in notepad++, preferences
Note:
1 file format, newline characters windows and linux are not the same
2 utf8 files do not have bom headers
Thank you for reading this article carefully. I hope the article "the solution that the shell script written by Notepad++ cannot be executed under linux" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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: 0
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.