search
HomeDevelopment ToolsnotepadHow to solve the problem that the shell script written in Notepad++ cannot be executed under Linux

How to solve the problem that the shell script written in Notepad++ cannot be executed under Linux

Notepad is a free and open source code editor under Windows environment. Supported languages: C, C, Java, C#, XML, HTML, PHP, Javascript!

This article will explain to you the solution to the problem that the shell script developed under Windows using notepad cannot be executed when uploaded to Linux (bom problem). Interested students can refer to it. (Recommended learning: notepad )

Problem description:

During a debugging shell statement, it was discovered that the shell copied from the notepad text When executed on Linux, there are no errors! But when uploading the shell script written in notepad to the Linux system for debugging, an error that the command cannot be found is reported! After thinking about it, the root cause of the problem must be on Nodepad. After searching for the reason, it turned out to be a problem with format conversion

1. View the current text format

In the Notepad interface, in There is a description of the file format in the lower right corner: "Dos\Windows or UNIX or Mac".

How to solve the problem that the shell script written in Notepad++ cannot be executed under Linux

#2. File conversion method

But if you need to convert like this every time you write a shell file, it may be very troublesome, then there is Is there no permanent solution?

The answer is yes, we can set Notepad to create new files in shell format by default. The specific operations are as follows:

Open in notepad, settings, first Options

How to solve the problem that the shell script written in Notepad++ cannot be executed under Linux

Note:

1 File format, line breaks are different between windows and linux

2 Do not have BOM header in utf8 files

The above is the detailed content of How to solve the problem that the shell script written in Notepad++ cannot be executed under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Creators of Notepad  : Exploring Its National BackgroundThe Creators of Notepad : Exploring Its National BackgroundMay 10, 2025 am 12:23 AM

Notepad was developed in 2003 by Vietnam-born French programmer Don Ho. 1. DonHo has accumulated rich programming experience in France. The original intention of developing Notepad was to create a text editor that is more powerful than Windows Notepad. 2. Vietnam's diligence and French romance are perfectly integrated in Notepad, reflected in its efficient performance and simple and elegant user interface design. 3. As an open source project, Notepad's success is inseparable from DonHo's efforts and persistence, despite the challenges of maintenance and updates.

Where Did Notepad   Originate? A Geographical LookWhere Did Notepad Originate? A Geographical LookMay 09, 2025 am 12:24 AM

Notepad originatedinFrance,developedbyDonHo.ItreflectsFrenchinnovationanddesign,supportsmultipleprogramminglanguages,andhasevolvedintoaglobaltoolduetoitsopen-sourcenatureandcommunitysupport,makingitaversatileanduser-friendlytexteditor.

Is Notepad   Free? Understanding the CostsIs Notepad Free? Understanding the CostsMay 08, 2025 am 12:05 AM

Yes,Notepad isfreetodownloadanduse.1)It'sopen-sourceundertheGNUGPL,allowingfreedistributionandmodification.2)Hiddencostsincludetimetolearnfeaturesandplugins.3)Communitysupportisavailablebutcanbetime-consuming.4)Somepluginsmayrequiredonationsorhavepr

Installing Notepad  : Downloading, Running, and ConfiguringInstalling Notepad : Downloading, Running, and ConfiguringMay 07, 2025 am 12:04 AM

Notepad isaversatiletexteditorthatenhancescodingefficiency.1)Downloadfromtheofficialwebsiteandinstallbychoosingthecorrectversionforyoursystem.2)CustomizetheinterfaceviaSettings>StyleConfiguratorandsetpreferredlanguageslikePythonthroughLanguage>

Installing Notepad  : Quick and Simple StepsInstalling Notepad : Quick and Simple StepsMay 06, 2025 am 12:12 AM

Notepad installation is very simple and takes only a few minutes. 1. Visit the official website to download the appropriate version. 2. Open the download file and follow the prompts to install. 3. It can be used after installation. It not only supports multiple programming languages, but also extends functions through plug-ins, which is a must-have tool for programmers.

The Notepad   Installation Guide: Everything You Need to KnowThe Notepad Installation Guide: Everything You Need to KnowMay 05, 2025 am 12:15 AM

Notepad is a free open source text editor for programming and code editing. The installation steps include: 1. Visit the official website to download the latest version; 2. Double-click the installation file and complete the installation; 3. Start and perform basic configuration. Notepad supports multiple programming languages, with functions such as syntax highlighting, code folding, macro recording, etc., and can expand its functions through plug-ins.

Notepad  's Pricing Model: A Deep DiveNotepad 's Pricing Model: A Deep DiveMay 04, 2025 am 12:01 AM

Notepad adopts a completely free pricing model. 1) This model has attracted a large number of users, formed a huge community, and provided rich feedback and improvement suggestions. 2) Through user donations and corporate sponsorship, Notepad has achieved sustainable development, but unstable funding sources are a challenge it faces.

Installing and Using Notepad  : Your First StepsInstalling and Using Notepad : Your First StepsMay 03, 2025 am 12:01 AM

Notepad is a free Windows text editor that supports multiple programming languages. It is easy to install, just download and run the installer from the official website. Basic features include multi-tab editing, syntax highlighting, and code collapse. Examples of usage include opening and saving files, finding and replacing, and plug-in usage. Personalized settings and shortcut keys can optimize the user experience, and plug-ins can implement code backup and version control.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool