Linux / Unix Shell script to the next question arise: /start.sh [6]: ^ M: not found

Error message:
./start.sh[6]: ^ M: not found
./start.sh[7]: ^ M: not found
Screenshot:
Here Insert Picture Description
Cause of error:
   in fact ^ M is a newline at the windows. Because I was in Windows start.sh edit, and then use ftp upload to unix, do not realize the difference between windows and unix system file system format, the solution is to use ultraedit to convert.
Conversion method: File -----> Save As ----->
Here Insert Picture Description

Published 142 original articles · won praise 44 · views 60000 +

Guess you like

Origin blog.csdn.net/weixin_40916641/article/details/103048262