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

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

输入命令 :set fileformat

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

输入命令 :set fileformat=unix

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

猜你喜欢

转载自www.cnblogs.com/shangshen/p/12723131.html