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

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

 

输入命令 :set fileformat

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

输入命令 :set fileformat=unix

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

 

相关文章:

  • 2022-12-23
  • 2022-01-23
  • 2021-09-10
  • 2021-12-04
  • 2021-04-17
猜你喜欢
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
相关资源
相似解决方案