Linux executes the .sh file and prompts the solution to the problem of No such file or directory

Linux executes the .sh file and prompts the solution to the problem of No such file or directory

Modified the shell script file under the window platform, migrated to the linux platform, assigned executable permissions, and executed the sh file.

But it prompts No such file or directory.


The file format compatibility problem, open the sh file with vim, enter:
:set ff  
Enter, display fileformat=dos, reset the file format:
:set ff=unix  
Save and exit:
[plain]
:wq  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326028211&siteId=291194637