Sh scripts written by Windows cannot be executed on Linux-command not found

The encoding is not recognized,
vi * .sh
• View the file format (display fileformat = dos) or the command : set fileformat

 

Enter the command : set fileformat

• Modify the file format (display fileformat = unix after modification)

Enter the command  : set fileformat = unix

Esc input : wq and
 finally re-execute the sh file

 

Guess you like

Origin www.cnblogs.com/shangshen/p/12723131.html