The sh script is abnormal and cannot be executed: /bin/sh^M: bad interpreter: No such file or directory 1 The file exists 2 Reasons: It has been edited under windwos. Delete all ^M inside

Use vi hold.sh to find that each line is more ^M

Reason: edited under windwos.

Solution: Just delete all ^M inside. Or use UE to convert the format to unix.

Therefore, the script must not be edited with Windows Notepad . You can use UE.

Guess you like

Origin blog.csdn.net/chenhao0568/article/details/105945511