Originally this year, Chiang has plans to learn the contents of Linux script, so in a variety of books in the previous activities to buy a lot of books, but most of the plastic cover has not been demolished. Today, the company has no business, so try to toss back the script, although there are some references on the Web documents, but at any time also need to explore their own side and modify to more convenient for our general purpose of the script.
Many of our friends play Linux scripts to modify and write the time is based on the Windows system, so we edit the script file is easy to run when the "/bin/sh^m:bad interpreter:no such file or directory" error problem. We'll solve the problem when we have a problem. There are a number of such solutions on the Web, which we use directly in an effective way.
The code is as follows |
Copy Code |
Yum-y Install Dos2unix #CentOS
Apt-get install-y Dos2unix #Debian
|
We need to install the Dos2unix component to convert our scripts to format.
Second, perform the conversion
The code is as follows |
Copy Code |
Dos2unix itbulu.com.sh
|
We need to upload an existing SH script to the corresponding directory and then perform a script conversion.
After this conversion is complete, we can then execute our own script file.