windows编写sh脚本在linux上不能执行——command not found

编码没有被识别,
vi *.sh
• 查看文件格式(显示  fileformat=dos)或者命令:set fileformat

 

输入命令 :set fileformat

• 修改文件格式(修改后 显示 fileformat=unix)

输入命令 :set fileformat=unix

Esc输入 :wq
 最后重新执行sh文件

 

posted @ 2020-04-17 22:53  Ziv_zhong  阅读(469)  评论(0编辑  收藏  举报